[top] [prev] [next]

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.

[top] [prev] [next]


[Modula-3 home page]

m3-request@src.dec.com
Last modified on Tue Oct  3 17:30:00 PDT 1995 by heydon
     modified on Mon Apr 18 14:07:20 PDT 1994 by kalsow