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

2.7 Operators

Within the next few paragraphs we are going to see the operators used in SCARLET. Depending on how they work they are classified as relational, logical, binary, and arithmetical operators. Some of them work similarely, so they are designated by the same symbol, they will be discussed together, too.

Only some special operators, such as brackets [ ] to extract single characters from string expressions or the selection operator . to select single registers of cell expressions as well as the assign operators, are talked about later.

All operators dealed with here, except the logical negation sign ! and the signs + and -, are used with two operands in infix notation. Therefore, the syntax for this type is in general:

Expression1 Op Expression2

Here Op means the chosen operator, while Expression1 and Expression2 are elements of one certain expression class. The result of such an action will again be an expression.

Unlike this, operators with only one operand (unary operators) are directly - and without blank - placed in front of the operand:

Op Expression

The statements about the membership of operand and result are also valid in this situation.


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