Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!att!cbnewsl!dfp From: dfp@cbnewsl.ATT.COM (david.f.prosser) Newsgroups: comp.std.c Subject: Re: strto[dl] Message-ID: <1009@cbnewsl.ATT.COM> Date: 6 Jul 89 14:28:38 GMT References: <12458@bloom-beacon.MIT.EDU> Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser) Distribution: usa Organization: AT&T Bell Laboratories Lines: 16 In article <12458@bloom-beacon.MIT.EDU> scs@adam.pika.mit.edu (Steve Summit) writes: >Microsoft's implementation of strtol (or was it strtod? I >forget) returns, when given the string " x", a 0, with the "end >pointer" argument pointing to the 'x'. I think this is a bug. All of strto{d,l,ul} have the same statement: If the subject sequence is empty, or does not have the expected form, no conversion is performed; the value of nptr [the char * parameter] is stored in the object pointed to by endptr [the char ** parameter], provided that endptr is not a null pointer. Thus, if any of these functions are passed the string " x", the character pointed to by the end pointer should be the space. Dave Prosser ...not an official X3J11 answer...