Next: Built-In Func/Proc, Up: Modula-2
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<.
ORAND, &@+, -*/*.
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: Set expressions 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.