WHOLEIO.DEF 1.5 KB

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