From: bill@sfu.ca (Bill Baines)
Subject: Re: clib atof() question resolved... Thanks!!!
Date: Fri, 15 Oct 1993 00:32:44 GMT [thread overview]
Message-ID: <1993Oct15.003244.1849@sfu.ca> (raw)
In-Reply-To: 1993Oct14.043648.1611@sfu.ca
In article <1993Oct14.043648.1611@sfu.ca> I posted the following code:
> --------------------
> #include <math.h>
> int main()
> {
> double f1;
> char *s1 = "1234.567";
>
> f1 = atof(s1);
> printf("%s, %f\n",s1, f1);
> }
> --------------------
Today I rec'd several replys -- most suggesting that I #include <stdlib.h>
which I did -- both in the above example, and in the original code I
am porting. PROBLEM SOLVED! Thanks again for your kind suggestions.
Several also mentioned that I should have checked the man page for atof()
which would have advised me that atof() was prototyped in stdlib.h.
Interesting, that NeXT 2.1, NeXT 3.0 and Sun 4.? don't mention stdlib.h
in their atof man page. Same goes for the NeXT Digital Librarian I have. (My
own system has been diddled up and down a few times, so I may not have the
latest man pages loaded -- perhaps I should reload the man pages from the
CD-Rom).
VAX/VMS help and SGI Irix do make mention of stdlib.h in their references to
atof().
Anyways, lesson learned... Thanks again for your kind responses...
--
Bill Baines, Operations and Tech. Support,
Simon Fraser University, Vancouver, British Columbia, Canada
bill@sfu.ca, (604) 291-3955, (fax 291-4242), VE7FML
prev parent reply other threads:[~1993-10-15 0:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-10-14 4:36 clib atof() question Bill Baines
1993-10-14 13:06 ` Bob Doherty
1993-10-14 13:18 ` Ken Cowan
1993-10-15 0:32 ` Bill Baines [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox