Next: , Previous: Inc, Up: Reference



Include

Synopsis

     Include (set_variable, ordinal_value);

Description

Add (join) a single element to a set. ordinal_value must be compatible with the base type of set_variable. Include is equivalent to:

     set_variable := set_variable + [ordinal_value];

If set_variable already contains ordinal_value, nothing happens.

Conforming to

Include is a Borland Pascal extension.

Example

     program IncludeDemo;
     
     var
       Ch: Char;
       MyCharSet: set of Char;
     
     begin
       MyCharSet := ['P', 'N', 'L'];
       Include (MyCharSet , 'A')  { A, L, N, P }
     end.

See other examples in set and Set Operations.

See also

Keywords, Set Operations, set, in, Exclude.