ISO 10514 implementation documentation
Implementation Documentation as per ISO 10514
Some things, like for example the memory requirements of the data types, cannot
be standardized. The standard calls such quantities "implementation defined"
and stipulates that they should be clearly defined by the respective implementation.
- The Stony Brook Modula-2 compiler is a "multi-pass" compiler and
requires therefore only that identifiers must be declared before they can be
used in subsequent declarations ("declare before use in declarations")
- The compiler can be made to operate in standard mode using the extended syntax
- Those kinds of exception conditions which the standard stipulates must be recognized,
are all triggered at run time. Code for detecting overflow during whole-number
arithmetic is supported. The access of uninitialized variables is detected to
a limited degree.
- Character set: all sets with base type CHAR are possible.
- The step size of a FOR loop must be an INTEGER value.
- Floating-point arithmetic in constant expressions is done internally by the
compiler in IEEE 64-bit precision format, and floating-point constants ("RR
type" and "CC type") are stored in that form.
- 32-bit mode: INTEGER values range from -2147483648..2147483647 and CARDINAL
values range from 0..4294967296.
- 16-bit mode: INTEGER values range from -32768..32767 and CARDINAL values range
- The type CHAR is implemented in one of two formats, selected by a compiler
The ordinal values 0 to 255; the characters in the range 0 to 127 conform to
the ASCII code.
The ordinal values 0 to 65535 (Unicode); the characters in the range 0 to 127
conform to the ASCII code.
- The type PROTECTION is declared as
TYPE PROTECTION = PACKEDSET OF CARDINAL[0..(SIZE(CARDINAL)*8)-1];
- The "ZZ type" for whole number constants has a range of (-2**63)
- The number of values comprising an enumeration type is limited to the range
- The base type of a set type may not comprise more than 262144 values.
- The SHIFT and ROTATE functions from the SYSTEM module accept PACKEDSET types
for their first parameter.
- 32-bit mode: MAKEADR has one formal parameter of type CARDINAL.
- 16-bit mode: MAKEADR has one or two formal parameters of type CARDINAL.
Any standard function calls yielding a constant as the result are allowed in a
constant expression. Also any functions from the SYSTEM module having this property
are also allowed.
Constant calculations involving real or complex numbers are carried out in IEEE
64-bit precision mode.