![]() |
![]() |
![]() |
![]() |
(Symb. Constants) | Contents | Index | (Operators..) |
SCARLET becomes a real programming language by putting variables at our
disposal. They always have to be denoted by elements of
Identifier.
In contrast to many other programming languages (e.g., C),
all variables
have to be declared at the beginning of the program where they will be
used in. For more details on this topic, please refer to
paragraph 'Variables' of RDL.
The intention of a preceding definition is to classify each variable as an
object of one of the data types known by SCARLET,
namely INT,
STRING,
BOOL,
or CELL (and connected to this to allocate
the memory size needed).
Once the type is fixed, it cannot be changed during a run of the program.
That is why we have the right to speak more precisely of elements of
If we form the projection of a cell variable on a certain register by attaching the register name, we get an object of IntVar again, when the register type is INT,
and an element of StringVar, when it is of type STRING.
To conclude this paragraph we give a little overview over all possibilities to obtain integer or string type variables:
|
|
![]() |
![]() |
![]() |
![]() |
(Symb. Constants) | Contents | Index | (Operators..) |