Skip to main content

Control

Two modifiers are provided which govern the existence of items in the definition. The first is the repetition modifier:

factor r |[extent ]|.

This causes the following item definition or item definitions (if the extent indicates more than one) to be repeated. Thus the description

(3rC)

is equivalent to the description

(C,C,C).

The other control modifier is the condition modifier:

condition c |[extent ]|.

If the condition specified is not true, then the following item definition is ignored. The condition is specified by a Boolean expression.

Since several modifiers may apply to an item definition, there is a problem concerning the relationship among them. For example, if a repetition modifier and a conditional modifier apply to an item, does the condition apply to all the repeated items, or only to the first, assuming the extent of the condition modifier is one? The effect of multiple modifiers is dependent on the order in which they are evaluated. Two possible conventions come to mind. One says that repetitions are expanded first, then properties applied, and finally conditions applied to the resulting expanded item definitions, independent of the order in which the modifiers were specified in the description. Thus the description

(A=3c [ 4 ]4rF,I)

is equivalent to

(4rA=3c[ 4 ]F,T),

and if the condition is true, is equivalent to

(F,F,F,F,I),

or, if the condition is not true, is equivalent to

(T).

The other convention is that the modifiers are evaluated in the order in which they appear in the description, perhaps. in reverse order - the modifier immediately preceding an item definition is evaluated first, then the one next preceding, etc. This gives more flexibility of meaning to the mulitple modifiers. For example, the descriptions

(A=3c3rC)

and

(3rA=3cC)

are not equivalent. In the first, only the first of the three repetitions is affected by the condition whereas in the second, ll three repetitions are affected. Since this second convention is more flexible, it shall be the one assumed. This convention allows, for example, the repetition modifier to the applied to a named item as shown:

(3rAnC).

The name A applies to the three items (in effect, the name A is applied three times). This facility allows a name to be applied to a vertical column in a two dimensioned array by, for example, the description:

(3r[ 3 ]C,AnC,C)

which given the name A to the second column of the 3x3 array.