[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
set Declares a Set Variable or Type
type
<tname> = set of <ordtype>;
var
<vname> : set of <ordtype>;
A set does not actually hold values, as do arrays, records, and other
variables. Instead, it merely notes current membership, which can be
tested by means of the IN relational operator.
<tname> name of data type being defined.
<vname> name of variable being declared.
<ordtype> Can only be an ordinal data type, and then only one
with 256 or fewer values: Byte, Char, Boolean,
enumerated types, or sufficiently small Integer
subranges.
-------------------------------- Example ---------------------------------
type CharSet = set of Char;
Days = (Sun,Mon,Tues,Wed,Thur,Fri,Sat);
DaySet = set of Days;
LowSet = set of 0..15;
See Also:
in
of
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson