Contents | Prev | Next | Index
A set type defined as SET OF T comprises all sets of values of its set base type T. This must be a subrange of the integers between 0 and N-1, or a (possible subrange of an) enumeration type, with at most N values, where N is a small constant determined by the implementation. In this compiler N is 256.
set_type ::= SET OF simple_type |
The standard type BITSET is defined as follows:
BITSET = SET OF [0 .. 31]
Notice that, unlike other Modula-2 compilers, it is not possible to define the character set type as follows:
CHARSET = SET OF CHAR
The CHAR type is 2 bytes wide in this compiler because of the UNICODE support for Java. A character set type for the first 256 characters can be only defined by using a character subrange as the base type:
CHARSET = SET OF [CHR(0) .. CHR(255)]
Contents | Prev | Next | Index
Canterbury Modula-2 for Java (Last documentation update
Feb 8, 2000)
Copyright © 1998 Mill Hill &
Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to
mhc@webcom.com