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

3.1.2 Range of the Retina (RangeDeclaration)

Beneath the headline, the actual declarations of a RDL program start with the shape of the retina itself. As already mentioned, we think of it as a finite, connected set in ZZ^n. Because they are much easier to handle, and it grants the set to be connected, we consider in SCARLET only such retinas which form a cube. In each point (coordinate) of the set we imagine a cell of the CA to be located. According to this, we can always refer to a cell by its coordinate:

[ IntExpression1 , IntExpression2 , ... , IntExpressionn ]

or shorter

[ IntExpressionList ]

In fact, this notation is just the usual way to write a n-dimensional vector. Starting from this, we get the syntax of the whole cube easily by indicating two coordinates, which will be interpreted by SCARLET as two diametral corners of the cube.

RangeDeclaration - Syntax:

Syntax: RangeDeclaration

In more formal terms, if we compare the two coordinates in a certain component, we get the cube's extension in this direction of the coordinate system. The corners themselves belong to the retina. Because of this the retina's extension cannot be zero in no direction, therefore, the set cannot be empty, it always consists of at least one cell. It need not be underlined that IntExpressionList1 and IntExpressionList2 must have the same length. In fact, the dimension of the retina is given by the length, at the same time.

Because this declaration is located in the very beginning of the program, where variables and symbolic constants are still unknown to SCARLET, we cannot use them here.


Example 33:

RANGE [20]..[0]; defines a one-dimensional retina consisting of all the cells with coordinates between 0 and 20. - The first corner is not meant to have always the smaller values for its coordinate.

RANGE [-3,2,5]..[3,4,5]; defines a retina within the three-dimensional space. Because of the 5 in the third place of both of the coordinates, the retina is only "one cell thick"; actually it has got the properties of a two-dimensional retina.


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