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 4-2. Required Set Attributes<br />

Statement<br />

Attributes Required<br />

F L P S M N<br />

file in a ranked set x x<br />

file first x x<br />

file last x x x<br />

file before x x x<br />

file after x x<br />

remove first x x<br />

remove last x x x x<br />

remove specific x x x<br />

is empty<br />

x<br />

is in set<br />

Automatic checking †<br />

x<br />

x<br />

for each V in set x x<br />

for each V in set in rev. x x<br />

for each v from W in set<br />

x<br />

for each V from W in set in rev.<br />

x<br />

for each V after W in set<br />

x<br />

for each V after W in set in rev.<br />

x<br />

†<br />

Following sections describe automatic set diagnostics performed only when a<br />

membership attribute is included.<br />

4-10. Common Attributes<br />

An entity is characterized by its attributes. The attributes with which it is declared determine the<br />

values it can hold and the relationships it can have with other entities. Sometimes it is desirable that<br />

more than one entity type be able to have some characteristics in common, although the entity types<br />

may be different in other ways. By declaring that a number of different entity types have certain<br />

common attributes, it becomes possible to treat them all in the same way for some "generic" operations.<br />

An example of such a common attribute declaration is:<br />

every TANKER has a SPEED, a CARGO,<br />

and belongs to the HARBOR.SET<br />

every TUG has a SPEED<br />

and belongs to the HARBOR.SET<br />

168

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

Saved successfully!

Ooh no, something went wrong!