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

reserve F.TABLE, L.TABLE, N.TABLE and MATRIX as N by M<br />

must be executed.<br />

4.7 Attribute Definitions: Mode and Dimensionality<br />

Attributes of the system, and of permanent and temporary entities, may be declared to have any of<br />

the modes associated with variables. As with any global or local variables, modes can be declared<br />

by default, using normally statements, and explicitly, using define statements. Set pointers are<br />

automatically declared to be of integer mode.<br />

Permanent and temporary entity declarations define the dimensionality of their attributes implicitly,<br />

making additional definitions unnecessary. The statement:<br />

every PERSON has an AGE<br />

declares that AGE has a single subscript, a pointer value if PERSON is declared as temporary, or an<br />

index value if PERSON is permanent. The notation AGE(PERSON), meaning AGE of PERSON,<br />

provides for this subscript. System attributes, on the other hand, must be declared and reserved as<br />

explained in paragraph 4.6.<br />

The rules for assigning modes and dimensionalities to attributes are straight forward.<br />

Mode:<br />

1. The current "background mode" is assigned to all attributes specified in every and the<br />

system statements except for automatically-generated set pointers.<br />

2. Define statements following every and the system statements can redefine attribute<br />

modes.<br />

Dimensionality:<br />

1. The current "background dimensionality" is assigned to all attributes and sets specified in<br />

the system statements.<br />

2. Every statements specify the dimensionality of the attributes and sets listed in them.<br />

The following preamble illustrates each of these rules.<br />

150

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

Saved successfully!

Ooh no, something went wrong!