18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SIMSCRIPT</strong> <strong>II.5</strong> <strong>Programming</strong> <strong>Language</strong><br />

the number, including its sign and decimal point, and the last four positions used for the scale factor<br />

E±xx.<br />

E-formatted input data can be written in a variety of ways, as the scale factor may or may not contain<br />

a sign or the letter E. The numbers 1.00E+05, 1.0E05, +1.0E 5, and 1.0E+5 are equivalent<br />

input data representations of the number 100,000 under the input format E(7,1). As shown below,<br />

either a sign or the letter E must be present to separate the number and scale factor fields.<br />

It must be emphasized again that when values are too large to be printed in their indicated formats,<br />

data should be displayed in scientific notation, as governed by the following rules:<br />

Field<br />

Width Characters Printed Example: Number=247.538<br />

1 {"E"} E<br />

2 {sign of number} {"E"} +E<br />

3 {sign of number} {"E"} {sign of exponent} +E+<br />

4 {sign of number} {"E"} {sign of exponent} {d} +E+2<br />

d = digit if 0 ≤ exponent ≤ 9, or = * if exponent > = 10<br />

5 {sign of number} {"E"} {sign of exponent} +E+02<br />

{exponent}<br />

6 {sign of number} {digit} {"E"} +2E+02<br />

{sign of exponent} {exponent}<br />

7 {sign of number} {digit} {"."} {"E"} +2.E+02<br />

{sign of exponent} {exponent}<br />

8 {sign of number} {digit} {"."} {digit} +2.4E+02<br />

{"E"} {sign of exponent} {exponent}<br />

9 {sign of number} {digit} {"."} +2.47E+02<br />

or {additional digits} {"E"}<br />

+2.475E+02<br />

more {sign of exponent} {exponent} +2.47538E+02<br />

Numbers can be written in scientific notation for free form as well as for format-directed input. A<br />

field of the form: {number} {exponent} is interpreted as a scientific notation input field in free-form<br />

input statements. No blanks are allowed between the number and exponent parts of the field. The<br />

forms of these parts are:<br />

{number}:<br />

{exponent}:<br />

a real or integer constant<br />

E±xx E is optional<br />

+ is not needed if exponent is positive<br />

108

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!