strtod() problem - bug in library?

John F Haugh II jfh at greenber.austin.ibm.com
Fri Apr 26 02:49:44 AEST 1991


In article <1991Apr23.071505.16713 at gibdo.engr.washington.edu> slh at gibdo.engr.washington.edu (PUT YOUR NAME HERE) writes:
>	strtoul() also seems to be incorrect:
>	if integer can not be formed, addr before string is returned in pointer
>	and not string

I wasn't able to even find strtoul() on AIX 1.2, so I wasn't able to
test your assertion regarding strtoul().  I did, however, test it
against strtol() and found that it behaves incorrectly.  In particular,

	char *end;

	strtol ("  hi mom!", &end, 0);

declares that "  hi mom!" is a valid integer with value 0 by returning
'end' as a pointer to "hi mom!", which then fails.  I have requested
that strtol() be fixed.  If you can get more information concerning
strtoul(), please let me know.
-- 
John F. Haugh II      |      I've Been Moved     |    MaBellNet: (512) 838-4340
SneakerNet: 809/1D064 |          AGAIN !         |      VNET: LCCB386 at AUSVMQ
BangNet: ..!cs.utexas.edu!ibmchs!auschs!snowball.austin.ibm.com!jfh (e-i-e-i-o)



More information about the Comp.unix.aix mailing list