Instructions

194Compiler
© 2013 Conrad Electronic
Arithmetic Expressions
An arithmetic expression is a quantity of values connected by Operators. In this case quantities can
either be Figures, Variables or Functions.
A simple example:
2 + 3
Here the numerical values 2 and 3 are connected by the Operator "+". An arithmetic value again rep-
resents a value. In this case the value is 5.
Further examples:
a - 3
b + f(5)
2 + 3 * 6
Following the rule "Dot before Line" here 3 times 6 is calculated first and then 2 is added. This prior-
ity is in case of operators called precedence. A list of priorities can be found in the Precedence
Table.
Comparisons too are arithmetic expressions. The comparison operators return a truth value of
"1" or "0", depending on whether the comparison was true or not. The expression "3 < 5" yields the
value "1" (true).
Constant Expressions
An expression or portions of an expression can be constant. Portions of an expression can already
be calculated during Compiler runtime.
So e. g. the expression
12 + 123 - 15
is combined by the Compiler to
120.
In some cases expressions must be constant in order to be valid. E. g. also see Declaration of Ar-
ray Variables.
4.3.3 Data Types
Values always are of a certain data type. Integer values (integral values; whole numbered values) in
BASIC are of the 8, 16 or 32 Bit wide data type, floating point values are always 4 byte long.