ATOF (III)                   1/15/73                   ATOF (III)





NAME            atof -- ascii to floating



SYNOPSIS        jsr     r5,atof; subr



DESCRIPTION     atof will convert an ascii stream to a floating

                number returned in fr0.



                The subroutine subr (supplied by the caller) is

                called on r5 for each character of the ascii

                stream.  subr should return the character in r0.

                The first character not used in the conversion is

                left in r0.



                The only numbers recognized are:  an optional mi-

                nus sign followed by a string of digits option-

                ally containing one decimal point, then followed

                optionally by the letter "e" followed by a signed

                integer.



                The subroutine subr must not disturb any regis-

                ters.



FILES           kept in /lib/liba.a



SEE ALSO        Calls atoi (III)



DIAGNOSTICS     There are none; overflow results in a very large

                number and garbage characters terminate the scan.



BUGS            The routine should accept initial "+", initial

                blanks, and "E" for "e".



                Overflow should be signalled with the carry bit.