![]() |
![]() |
![]() |
![]() |
(..Statement Part..) | Contents | Index | (SDL: ..) |
|
This second (and last) main part of a RDL program starts with the keyword
Like this the statement part is set off against the preceding declaration part. START is followed by an arbitrary amount of assignments to sites of the retina
in any order whatever.
SCARLET evaluates all these devices only once
beginning at START. Contents of cells and cell variables
are changed immediately after each assignment.
This seems not to be worth mentioning, since it is the usual way of
evaluating computer programs. But glancing at
SDL, we will soon see that those
programs form an exception to the rule...
RETINA initial; RANGE [0,0]..[5,5]; REGISTER INT num; STRING str; VAR /* could be omitted */ CONST /* -"- */ START |
Source Code: initial.rdl
The last device causes each site within a certain - but yet not fixed - area to get the state of another site that is found by a random procedure.
RETINA modern_art; RANGE [0,0]..[20,15]; REGISTER STRING point; VAR CONST yellow = "*"; red = "/"; green = "+"; blue = "-"; START [0,0]..[20,10] = {blue}; [1,5] (3) [20,15] = {green}; [7,5] (2,1) [15,10].point = red; [2,3]..[17,7] = {yellow}; [10+rand(-2,2),1]..[19,5] = [10+rand(-5,5),7+rand(-3,3)]; |
Source Code: art.rdl
![]() |
![]() |
![]() |
![]() |
(..Statement Part..) | Contents | Index | (SDL: ..) |