This article is part of the Getting Started series

Sets are like arrays (or vectors), a group of elements of the same kind but, unlike to the arrays, the elements may not repeat within. Sets are uncommon for the fact that they can only contain small elements (bytes or chars).

Example Edit

var x,y,z: set of byte;
z:=x+y; {z will be [1,2,3,4,5,6,7,8,9]}

Determining whether variables are or not within a set Edit

if 5 in z
write ('5 was met in the Z set.');
if not(11 in z)
write ('11 was not met in the Z set.');

In verifies if a variable is met inside Z.