From: Logan Capaldo Date: 2006-02-09T09:52:33+09:00 Subject: Re: boolean annoyance --Apple-Mail-8-77864652 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Feb 8, 2006, at 7:41 PM, Claudio Jeker wrote: > This is not correct. strtol(3) does not return 0 in case of an > error. It > sets errno to ERANGE and returns LONG_MAX or LONG_MIN. RETURN VALUES The strtol(), strtoll(), strtoimax() and strtoq() functions return the result of the conversion, unless the value would underflow or overflow. ***If no conversion could be performed, 0 is returned and the global vari- able errno is set to EINVAL.*** If an overflow or underflow occurs, errno is set to ERANGE and the function return value is clamped according to the following table. Emphasis (the triple *) mine. --Apple-Mail-8-77864652--