previous contents index next
(..Constants) Contents Index (Variables)

2.5 Symbolic Constants (ConstantIdentifier)

Sometimes there are certain constants that would appear very often within the source code. Because it can be rather boring to type them again and again, SCARLET offers - as most of the high-level programming languages - a possibility to define symbolic names, which can be used as abbreviations. Here the name must be an element of the class Identifier. Constants which are represented by a symbolic name are called symbolic constants. Agreements of this type must occur in the declaration part of a (RDL or SDL) program. In consequence of its declaration, a symbolic constant automatically becomes an object of one of the types INT, STRING, BOOL, or CELL. Depending on this, we also speak of elements of the classes

Since their meaning is directly connected to the programming environment they are used in, we will discuss how to declare them in detail in the chapter about RDL.


previous contents index next
(..Constants) Contents Index (Variables)