Contents | Prev | Next | Index
For a given operator, the types of its operands are expression compatible if they conform to the following table (which also shows the result type of the expression). Type T1 must be an extension of type T0:
Operator | 1st Operand | 2nd Operand | Result Type |
+ - * | numeric | numeric | smallest numeric type including both operand types |
/ | numeric | numeric | smallest real type including both operand types |
DIV MOD | integer | integer | smallest integer type including both operand types |
+ - * / | SET | SET | SET |
OR & ~ | BOOLEAN | BOOLEAN | BOOLEAN |
= # < <= > >= | numeric | numeric | BOOLEAN |
CHAR | CHAR | BOOLEAN | |
character array,string | character array,string | BOOLEAN | |
= # | BOOLEAN | BOOLEAN | BOOLEAN |
SET | SET | BOOLEAN | |
NIL, pointer type T0 or T1 | NIL, pointer type T0 or T1 | BOOLEAN | |
NIL, procedure type T | NIL, procedure type T | BOOLEAN | |
IN | integer | SET | BOOLEAN |
IS | type T0 | type T1 | BOOLEAN |
Contents | Prev | Next | Index
Canterbury Oberon-2 for JVM (Last documentation update
Jun 2, 2000)
Copyright © 1998 Mill Hill &
Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to
mhc@webcom.com