Modula-3: Set types

# Set types

A set is a collection of values taken from some ordinal type. A set type declaration has the form:

        TYPE T = SET OF Base

where `Base` is an ordinal type. The values of `T` are all sets whose elements have type `Base`. For example, a variable whose type is `SET` `OF` `[0..1]` can assume the following values:

        {}     {0}     {1}     {0,1}

Implementations are expected to use the same representation for a `SET OF T` as for an `ARRAY T OF BITS 1 FOR BOOLEAN`. Hence, programmers should expect `SET OF [0..1023]` to be practical, but not `SET OF INTEGER`.

    Last modified on Wed Apr  3 09:38:56 PST 1996 by heydon
         modified on Mon Apr 18 14:07:20 PDT 1994 by kalsow