18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

routine PROGVAR given RVAR yielding VALUE<br />

define RVAR as a subprogram variable<br />

define VALUE as an integer variable<br />

if RVAR ne 'DATA.PLOT'<br />

and RVAR ne 'DATA.PRINT'<br />

call RVAR giving DATA(*) yielding VALUE<br />

else<br />

call RVAR giving DATA(*)<br />

let VALUE = 0<br />

always<br />

return<br />

end<br />

_______________________________________________________________________________<br />

2.31 The Store Statement<br />

Previous implementations of <strong>SIMSCRIPT</strong> <strong>II.5</strong> offered a store statement which provided for assignment<br />

of variables without any attempt at variable mode conversion. This proved to be a common<br />

source of error. The store statement is still provided, but it is restricted to use only with<br />

variables of compatible mode. Its effect is identical with that of the let statement, which is recommended<br />

as preferred usage. The store statement is not intended for use with values in the text<br />

mode. All other nonconversion assignments may be achieved by variable equivalencing, described<br />

in Chapter 6.<br />

98

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

Saved successfully!

Ooh no, something went wrong!