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.

Appendix A.<br />

Format Conventions Used In<br />

Print Statments<br />

Value & Typical Formats Display Results Examples<br />

Integer<br />

* (a) Print an integer value. Print 1 line with J thus<br />

The value of J is***<br />

**<br />

***<br />

(b) If the expression is not integer-valued,<br />

print a<br />

rounded integer value by<br />

adding + or - 0.5 to the value<br />

of the expression, depending<br />

on its sign, and<br />

truncating the result.<br />

(c) Print as many digits as<br />

possible to the left, upto<br />

the next nonconsecutive *<br />

or textual character, treating<br />

the rightmost as the<br />

low-order position; if<br />

space not sufficient, use<br />

scientific notation.<br />

prints, for j = 3<br />

The value of J is 3<br />

or prints, for J = 9.7<br />

The value of J is 10<br />

or prints, for J = -97.6<br />

The value of J is -98<br />

Decimal<br />

(d)Only the position of the<br />

rightmost digit must be<br />

shown.<br />

*.* (a) Print a decimal value; Print 1 line with X<br />

thus<br />

The value of X is *.**<br />

291

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

Saved successfully!

Ooh no, something went wrong!