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 C. <strong>SIMSCRIPT</strong> Reference Syntax<br />

C.3 Metavariables<br />

In order to compress the syntax description of the statements, several commonly repeated expressions,<br />

or metavariables, are defined here rather than at each permissible usage.<br />

arithmetic expression: = [ + | - ] { ( expression )<br />

| number<br />

| subprogram constant<br />

| string constant<br />

| [ $ ] variable<br />

} < + | - | * | / | ** ><br />

array reference: = ( [ expression ] < , > { * } < , > )<br />

comma: = { , | and |, and }<br />

for phrase:<br />

for { name { back from | = } expression to expression [ by expression ]<br />

| { each | all | every }<br />

{ permanent entity name | resource name [ called variable ]<br />

| name [ { from | after } expression ]<br />

{ of | in | on | at } set name [ subscript ]<br />

[ in reverse order ]<br />

}<br />

}<br />

} [ , ] [ selection clause | termination clause ] < ><br />

format:<br />

309

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

Saved successfully!

Ooh no, something went wrong!