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 />

Table 2-2. Real-Integer Input Data Conversions<br />

______________________________________________________________________________<br />

Input Data<br />

Variable<br />

Format Defined as Action<br />

integer integer Data value stored in variable<br />

integer real Data value converted to decimal representation<br />

and then stored in variable; e.g., 55<br />

stored as 55.0<br />

real real Data value stored in variable<br />

real integer Program terminates with error message; not<br />

possible to store fractional value in integer<br />

representation.<br />

_______________________________________________________________________________<br />

2.4 System-Defined Constants<br />

Scientific and engineering calculations often involve standard scientific constants. Mathematical<br />

computations frequently require values of numeric constants. Numbers such as PI = 3.14159..., and<br />

e = 2.718... are examples of well-known and often-used constants.<strong>SIMSCRIPT</strong> <strong>II.5</strong> maintains a library<br />

of standard values. When the name of a library constant is used in a <strong>SIMSCRIPT</strong> <strong>II.5</strong> program,<br />

the correct numeric value of the constant is inserted in its place. These constants may be used<br />

wherever a numeric literal constant could be used.<br />

Library constants have names that look like variable names except that they end in the characters<br />

.c (a naming convention used by the <strong>SIMSCRIPT</strong> <strong>II.5</strong> system). The library constants and their values<br />

are listed in table 2-3.<br />

42

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

Saved successfully!

Ooh no, something went wrong!