home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / modu1096.zip / ISOsym / wholeio.def < prev    next >
Text File  |  1996-08-29  |  2KB  |  45 lines

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