![]() |
![]() |
![]() |
![]() |
(..Table Part..) | Contents | Index | (..Table Part..) |
The more general form of table entries compared to IF-THEN-ELSE structures is mainly caused by the condition part:
|
As visible in the syntax diagram above, it consists not only of one but as many conditions as we want:
Furthermore there can also be assignments to variables:
Both kinds of units may be mixed up and put in any order. SCARLET will interprete them according to the rules given below:
Notice that SCARLET
works nonstrictly, this means, as soon as
the evaluation of one boolean expression
leads to FALSE, SCARLET
will skip the rest, because it is already sure that
Consequence will
be ignored.
center.state > 0; sum = left.state&1 + ... : state++; state%=3; : center.state == 0; sum >= 3; : SELF = {1}; :
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.
![]() |
![]() |
![]() |
![]() |
(..Table Part..) | Contents | Index | (..Table Part..) |