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.

Modelling Concepts<br />

both first and last. Because DOG is alone in KENNEL(FARM), it has no predecessor or successor entities.<br />

F.KENNEL<br />

L.KENNEL<br />

N.KENNEL<br />

FARM<br />

1<br />

LICENSE<br />

P.KENNEL<br />

S.KENNEL<br />

M.KENNEL<br />

DOG<br />

1 2 3<br />

0<br />

0<br />

0<br />

Figure 4-14. Entity Records<br />

After the second DOG is created and filed, the entity records take the form shown in figure 4-15.<br />

With two members in the set, the first and last pointers lead to different entity records. The first<br />

entity, pointed to by F.KENNEL(FARM), points ahead to the second entity with its successor pointer.<br />

The second entity points back at the first entity with its predecessor pointer. Both the predecessor<br />

pointer of the first entity and the successor pointer of the last entity are zero, indicating their<br />

respective roles.<br />

F.KENNEL<br />

L.KENNEL<br />

N.KENNEL<br />

FARM<br />

2<br />

LICENSE<br />

P.KENNEL<br />

S.KENNEL<br />

M.KENNEL<br />

1 2 3<br />

0<br />

0<br />

DOG<br />

LICENSE<br />

248<br />

P.KENNEL<br />

0<br />

S.KENNEL<br />

M.KENNEL 0<br />

Figure 4-15. Entity Records<br />

An important point to note is that the global variable DOG now points to the second DOG created.<br />

The entity record of the first DOG created can only be accessed through the pointers to it, L.KEN-<br />

NEL(FARM) and S.KENNEL(DOG). These pointers illustrate the general form of an attribute reference:<br />

attribute (entity identification)<br />

155

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

Saved successfully!

Ooh no, something went wrong!