home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xco212p.zip / ISODEF / wholeio.def < prev    next >
Text File  |  1994-12-22  |  1KB  |  36 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. IMPORT IOChan;
  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: IOChan.ChanId; VAR int: INTEGER);
  17.   (* Skips leading spaces, and removes any remaining characters from cid that form part of a
  18.      signed whole number.  The value of this number is assigned to int.  The read result is
  19.      set to the value allRight, outOfRange, wrongFormat, endOfLine, or endOfInput.
  20.   *)
  21.  
  22. PROCEDURE WriteInt (cid: IOChan.ChanId; int: INTEGER; width: CARDINAL);
  23.   (* Writes the value of int to cid in text form, in a field of the given minimum width. *)
  24.  
  25. PROCEDURE ReadCard (cid: IOChan.ChanId; VAR card: CARDINAL);
  26.   (* Skips leading spaces, and removes any remaining characters from cid that form part of
  27.      an unsigned whole number.  The value of this number is assigned to card. The read
  28.      result is set to the value allRight, outOfRange, wrongFormat, endOfLine, or endOfInput.
  29.   *)
  30.  
  31. PROCEDURE WriteCard (cid: IOChan.ChanId; card: CARDINAL; width: CARDINAL);
  32.   (* Writes the value of card to cid in text form, in a field of the given minimum width. *)
  33.  
  34. END WholeIO.
  35.  
  36.