t_setcase.mod 302 B

12345678910111213
  1. MODULE TSetCase;
  2. (* gm2 ext: a set-typed CASE selector with set labels (word-wise
  3. equality compare-chain). *)
  4. VAR b : BITSET; ExitCode : INTEGER;
  5. BEGIN
  6. b := {1, 2};
  7. CASE b OF
  8. {} : ExitCode := 1
  9. | {1,2} : ExitCode := 42
  10. | {3} : ExitCode := 3
  11. ELSE ExitCode := 9
  12. END
  13. END TSetCase.