Instances
can be referred to by the following navigation
expressions:
- If A is a
class, A[#j] denotes
the (j+1)th instance of the class currently in existence.
For example, A[#4] can denote the fifth instance
of the class. This is consistent with the C/C++ convention of calling
the first element A[0].
- If A is
a class, A can
denote the first instance of the class. This is the same as A[#0].
You
can use a class name instead of an instance name only in places where
there is no ambiguity whether it refers to the class or its first
instance. For example, A->GEN(E) generates an
event E for an instance A[#0]. However,
the animation command "Show A relations" displays
relation information about class A and all of its
instances.
- If B is a name
or navigation expression
that refers to an instance and that instance has a relation itsA, B->itsA denotes
the first element in B's relation with A and B->itsA[#i] denotes
the (i+1)th element.
The
same navigation expression can refer to different
instances during the execution. For example, if instances A[0] to A[5] have
been created and then A[3] is deleted, the expression A[#5] refers
to A[4] before the deletion and to A[5] after
the deletion.