home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPTOOL1.ZIP / ATOF.INC < prev    next >
Encoding:
Text File  |  1987-05-22  |  335 b   |  22 lines

  1.  
  2. #log Ascii to floating point conversion
  3.  
  4. (*
  5.  *
  6.  * converts ascii string to an float value
  7.  *
  8.  *)
  9.  
  10. function atof (asc:           anystring): real;
  11. var
  12.    code:          integer;
  13.    value:         real;
  14.  
  15. begin
  16.    while copy(asc,1,1) = ' ' do
  17.       delete(asc,1,1);
  18.    val(asc, value, code);
  19.    atof := value;
  20. end;
  21.  
  22.