.ATOF - ASCII to floating point binary.

Alternate Entry Name: ATOF

Usage:

B:
   status = .atof( string [, res] );
/* C users see "expl c lib atof" */

Description:

.ATOF converts the floating point number stored in ASCII in "string" to double precision binary in the vector "res". "res" is two words long.

A floating point number in ASCII form consists of

Either the integer part or the fractional part may be omitted. While the integer part may be given without the decimal point, the decimal point must be supplied if the fractional part is present.

If .ATOF detects any error in the format of the floating point number, it will return "-(n+1)", where "n" is the character position in "string" where the error was detected. If the number is syntatically correct but out of range, this will be "-(length(string)+1)". Successful conversion is indicated by returning zero.

If the vector "res" is not supplied, .ATOF returns the double precision number in the floating point register (the EAQ); in this case, there is no error return value. This will only be of use to a function written in GMAP, C or Pascal.

Copyright © 1996, Thinkage Ltd.