previous contents index next
(..Table Part..) Contents Index (..Table Part..)

Condition Part (ConditionPart)

 

The more general form of table entries compared to IF-THEN-ELSE structures is mainly caused by the condition part:

ConditionPart - Syntax:

ConditionPart

As visible in the syntax diagram above, it consists not only of one but as many conditions as we want:

BoolExpression ;

Furthermore there can also be assignments to variables:

VarAssignment ;

Both kinds of units may be mixed up and put in any order. SCARLET will interprete them according to the rules given below:

Remark:
It is quite important to realize that the condition part only allows assignments to variables, but not to cells.

Hoping all these rules and conditions on the condition part become a bit clearer, we give a little view of what it is for. During the simulation, the table will be applied to each cell in order to update their states. As soon as a cell complies with the condition of a certain entry, its state changes according to the corresponding consequence part. Therefore, the state of a site can only be changed in Consequence, but not in the condition part. Once a site is updated, the rest of the table is no longer of interest to it: It can be skipped. (See also the algorithm.)
Besides, since the state usually depends on the states of the cell's neighbours, it is quite comfortable to just string the conditions on the neighbours in the condition part together.


previous contents index next
(..Table Part..) Contents Index (..Table Part..)