home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol134 / convert.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  1.0 KB  |  25 lines

  1. HOW TO USE THE INTEGER AND REAL-NUMBER CONVERSION ROUTINES
  2.  
  3. I.  REAL NUMBERS
  4.  
  5.     GLOBALS.RN$ contains the required global CONST, TYPE, VAR, and
  6.     PROCEDURE definitions;  PASZCODE.RN$ contains the executable code.
  7.  
  8.     Execute procedure RNSETUP at the start of your run, to initialize
  9.     a table that is used for converting.  From then on, call function
  10.     INTTOSTR to convert the string representation of a number to a
  11.     real (flag GRERROR=TRUE if the string is not valid);  call RN$
  12.     to convert a real to a ready-to-print string.  RN$ is capable of
  13.     inserting punctuation (as for dollar-and-cents amounts), at your
  14.     option.  See the comments to these routines for details.
  15.  
  16.  
  17. II.  INTEGERS
  18.  
  19.     GLOBALS.INT contains the required global CONST and TYPE definitions;
  20.     PASZCODE.INT contains the executable code.
  21.  
  22.     Call INTTOSTR to convert an integer to a string, ready for display;
  23.     can be returned as a fixed-length field or with left padding
  24.     omitted, at your option.  See the comments to the routine for details.
  25.