Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: #include Message-ID: <1988Dec21.194513.18154@utzoo.uucp> Organization: U of Toronto Zoology References: <354@greens.UUCP> Date: Wed, 21 Dec 88 19:45:13 GMT In article <354@greens.UUCP> matthew@sunpix.UUCP ( Sun NCAA) writes: >...and atof(); to do the string to float conversion. But no where could >I find a function to validate the string to see if it did contain a number >that atof(); would correctly interpret... Some existing C implementations, and all future ANSI-conforming ones, have a "strtod" function (and a "strtol" counterpart) that does atof's job but gives you hooks to find out whether it worked and how much of the string it used up. -- "God willing, we will return." | Henry Spencer at U of Toronto Zoology -Eugene Cernan, the Moon, 1972 | uunet!attcan!utzoo!henry henry@zoo.toronto.edu