## 80 Pascal User Manual 

program SetOperations (Outf: I~); { program 8.2 - Illustra 0 set operations. } type Days Week var (Mon, Tue, Wed, [hu, Fri, Sat, Sun); set of Days; FullWeek, Work, Free: ·.,·,'k; Day: Days; procedure Check(W: Week) { procedures a I' introduced in Chapter 11 } var D: Days; begin for D := Mon to Sun do if D in W then Write ll,t put, , x') else Write(Output, , , I; Writeln(Output) end { Check }; begin Work:= []; Free:= []; ,'llllWeek·= [Mon .. Sun]; Day := Sat; Free := [Day] + Free + [, lin]; Check(Free); Work := FullWeek - Free; Check(Work); if Free <= FullWeek then Write(Output, '0'); if FullWeek >= Work then Write(Output, 'K'); if not (Work >= Free) thl n Write(Output, , Jack'); if [Sat] <= Work then Wr te(Output, , Forget it!'); Writeln(Output) end . 

## Produces as results: 

oooooxx xxxxxoo OK Jack 

## s.c. On Program Development 

Programming - in the sense of d~signing and formulating algorithms and data structures - is in general a complicated process requiring the mastery of numerous details and specific techniques. Only in exceptional cases will there be a single good solution. Usually, so many 

