[comp.sys.next] strtod on the NeXT

jesperse@nas.nasa.gov (Dennis Jespersen) (05/08/91)

This is for a colleague: on NeXT with 2.0 the function strtod is in
libsys_s.a (it's supposed to convert a string to a double precision
number).  First question: we can't find any documentation for strtod
on the NeXT; is there any?

Continuing, on various other machines (SUN, SGI, e.g.) there is
documentation on strtod:
  double strtod(str, ptr)
  char *str, **ptr;
and a description of how it is supposed to function.  My colleague
claims the NeXT strtod does not function as it is supposed to (ptr is
wrong in some cases).  Second question: is there a bug in strtod on
the NeXT?
--
Dennis Jespersen
MS 202A-1
NASA Ames Research Center
Moffett Field, CA 94035-1000
Voice: (415) 604-6742
FAX:   (415) 604-1095
email: jesperse@rft28.nas.nasa.gov
We have met the enemy and he is us. -- Pogo

jesperse@nas.nasa.gov (Dennis Jespersen) (05/08/91)

Following up on my own article:
>This is for a colleague: on NeXT with 2.0 the function strtod is in
>libsys_s.a (it's supposed to convert a string to a double precision
>number).  First question: we can't find any documentation for strtod
>on the NeXT; is there any?

strtod is defined in /usr/include/stdlib.h as:
extern double strtod(const char *nptr, char **endptr);

There doesn't seem to be a man page for it, however.  The second
question (does strtod behave correctly on the NeXT) is still open.
--
Dennis Jespersen
MS 202A-1
NASA Ames Research Center
Moffett Field, CA 94035-1000
Voice: (415) 604-6742
FAX:   (415) 604-1095
email: jesperse@rft28.nas.nasa.gov
We have met the enemy and he is us. -- Pogo

mmeyer@next.com (Morris Meyer) (05/08/91)

In article <JESPERSE.91May7153540@rft28.nas.nasa.gov> jesperse@nas.nasa.gov  
(Dennis Jespersen) writes:
> 
> Following up on my own article:
> >This is for a colleague: on NeXT with 2.0 the function strtod is in
> >libsys_s.a (it's supposed to convert a string to a double precision
> >number).  First question: we can't find any documentation for strtod
> >on the NeXT; is there any?
> 
> strtod is defined in /usr/include/stdlib.h as:
> extern double strtod(const char *nptr, char **endptr);
> 
> There doesn't seem to be a man page for it, however.  The second
> question (does strtod behave correctly on the NeXT) is still open.
> --
> Dennis Jespersen
> email: jesperse@rft28.nas.nasa.gov

strtod behaves correctly in 2.1.  The behaviour of strtod matches (now)
the strtod() description in K&R Version 2.  There should definately be a 
manpage for it.  As always, fixed in the next release.

		--morris

--
Morris Meyer            NeXT, Inc.
Software Engineer       900 Chesapeake Drive
NeXT OS Group           Redwood City, CA   94063
mmeyer@next.com

Success comes from taking the path of maximum advantage instead of
the path of least resistance.
                George Bernard Shaw