Operators must be defined on values of specific types. For instance,
+ is defined on numbers, but not on structures. Operators are
often defined on groups of types. For the purposes of Modula-2, the
following definitions hold:
INTEGER, CARDINAL, and
their subranges.
CHAR and its subranges.
REAL.
POINTER TO
type.
SET and BITSET types.
BOOLEAN.
The following operators are supported, and appear in order of increasing precedence:
,
:=
:= value is
value.
<, >
<=, >=
<.
=, <>, #
<. In GDB scripts, only <> is
available for inequality, since # conflicts with the script
comment character.
IN
<.
OR
AND, &
@
+, -
*
/
*.
DIV, MOD
*.
-
INTEGER and REAL data.
^
NOT
^.
.
RECORD field selector. Defined on RECORD data. Same
precedence as ^.
[]
ARRAY data. Same precedence as ^.
()
PROCEDURE objects. Same precedence
as ^.
::, .
Warning: Sets and their operations are not yet supported, so GDB treats the use of the operatorIN, or the use of operators+,-,*,/,=, ,<>,#,<=, and>=on sets as an error.