Set union (+)

Description

When the + operator has operands of set type then it performs set union (i.e. the result of the operation is a set with all the members from both operands).

Example

   ['a', 'e'] + ['a', 'c', 'z'] results in ['a', 'c', 'e', 'z']

To see this try the example program below:

   program setu(output);
   type
      letter = 'a'..'z';
   var
      s : set of letter;
      c : letter;
   begin
      s := ['a', 'e'] + ['a', 'c', 'z'];
      for c := 'a' to 'z' do
         if c in s then
            writeln(c)
   end.