type string = packed array[0..MAXSTR] of char; var x : real; s : string; function ctof(var s:string; var result:real):boolean; extern; ... if ctof(s, x) then writeln('Invalid number');
CTOF converts an ASCII character sequence representing a floating number into the corresponding real number. The number is returned in the function's second argument. The end of the number string must be marked by a null byte ('\0'). CTOF will return TRUE if the conversion was unsuccessful and FALSE otherwise. Note that all parameters are "var" parameters.
Copyright © 1996, Thinkage Ltd.