SWHOLEIO.DEF 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. DEFINITION MODULE SWholeIO;
  2. (* Input and output of whole numbers in text form over default channels.
  3. The read result is of the type IOConsts.ReadResults.
  4. *)
  5. (* The text form of a signed whole number is
  6. ["+"|"-"], decimal digit, {decimal digit} *)
  7. PROCEDURE ReadInt (VAR int : INTEGER);
  8. (* Skips leading space and removes any remaining characters
  9. that form part of a signed whole number.
  10. A corresponding value is assigned to the parameter int.
  11. The read result is set to the value allRight, outOfRange, wrongFormat,
  12. endOfLine, or endOfInput. *)
  13. PROCEDURE WriteInt (int : INTEGER;
  14. width : CARDINAL);
  15. (* Writes the value of the parameter int in text form in a field of the
  16. given minimum width. *)
  17. (* The text form of an unsigned whole number is
  18. decimal digit, {decimal digit} *)
  19. PROCEDURE ReadCard (VAR card : CARDINAL);
  20. (* Skips leading space and removes any remaining characters
  21. that form part of an unsigned whole number.
  22. A corresponding value is assigned to the parameter card.
  23. The read result is set to the value allRight, outOfRange, wrongFormat,
  24. endOfLine, or endOfInput. *)
  25. PROCEDURE WriteCard (card : CARDINAL;
  26. width : CARDINAL);
  27. (* Writes the value of the parameter card in text form in a field of the
  28. given minimum width. *)
  29. END SWholeIO.