program enum_set_test (output); type animal = (mouse,amoeba,bird,plant, bill_mudd,man,superman); var thing : animal; begin writeln ('Enumerated type test'); for thing := mouse to man do begin case ord(thing)+1 of 0, 1 : write ('Man or mouse '); 65535 : writeln ('Fail') end otherwise write ('Unimportant'); if thing in [mouse] then writeln ('Not human') else writeln ('Human bean'); end end.