home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_04 / 1n04044a < prev    next >
Text File  |  1990-07-25  |  218b  |  14 lines

  1.  
  2. n := 0;
  3. while c in ['0' .. '9'] do
  4.     begin
  5.     digit := ord(c) - ord('0');
  6.     if n < (MINLONGINT + digit) div base then
  7.         { overflow action };
  8.     n := 10 * n - digit;
  9.     c := next;
  10.     end;
  11. if not neg then
  12.     n := -n;
  13.  
  14.