showcase12lib.def 428 B

123456789101112131415
  1. DEFINITION MODULE Showcase12Lib;
  2. (* Step-8.2/8.3 showcase helper. Exports Point (used by the program
  3. through the qualified type name Showcase12Lib.Point) and Score,
  4. whose formal is ARRAY OF CHAR so 1-character string literals such
  5. as "A" coerce to it. *)
  6. TYPE
  7. Point = RECORD
  8. x, y : INTEGER;
  9. END;
  10. PROCEDURE Score (s : ARRAY OF CHAR) : INTEGER;
  11. (* "A" -> 2, "B" -> 3, anything else -> 0. *)
  12. END Showcase12Lib.