procedure Include
(
var SetVariable : set of SetValues; OneOfSet : SetValues
)
;

Description

The Include procedure includes a set value in a set variable.

A set variable is one that can contain 0, some, or all values of a set. When you Include a set value in a set variable, you are adding to the included values in the variable.

Include is equivalent to the + operator, as shown here :

Example code : Creating a variable containing only positive numbers 0 to 10

var
evenNumbers : Set of 0..10;
i : Integer;
begin // Make sure that evenNumbers only contains even numbers
evenNumbers := [];
for i := 0 to 10 do
if (i mod 2) = 0
then Include(evenNumbers, i); // Now display the set contents
for i := 0 to 10 do
if i in evenNumbers
then ShowMessage(IntToStr(i)+' is even');
end;