Examples of assignments 

Huel := [Red]; Hue2 := []; Hue2 := Hue2 + [succ(Red)]; Letters ['A' ,'B' ,'C' ,'0' ,'E' ,'F' ,'G' ,'H' ,'I', 'J' ,'K' , 'L' ,'M' , 'N' , '0' , 'P' ,'Q' , 'R' , , S' , ' T' , 'U' , 'V' , 'W' , ' X' , ' Y' , ' Z' ] ; Vowels:= ['A','E','I','O',U]; Consonants := Letters - Vowels; Add := [2,3] <= Opcode 

Set operations are intended to be relatively fast and can be used to eliminate more complicated tests. A simpler test for: 

if (Ch='A')or(Ch='E')or(Ch='I')or(Ch='O')or(Ch='U') then S 

is: 

if Ch in ['A','E','I','O','U'] then S program Convert(Input,Output); { Program 8.1 - Read a sequence of digits and convert them to the integer they represent. Assume no leading sign. } var Ch: Char; Digits: set of '0' .. '9'; Number: Integer; begin Digits := ['0' .. '9'] Read(Input, Ch); Number := 0; while Ch in Digits do begin { initialize value of the set}; Number := Number * 10 + Ord(Ch) - Ord('O'); Writeln(Output, Number); Read(Input, Ch) end Ch contains the character following the integer } end 

Produces as results (assuming appropriate input): 

4 43 432 4321 

