From: David Vallner Date: 2006-02-09T10:50:01+09:00 Subject: Re: boolean annoyance Dňa Štvrtok 09 Február 2006 01:52 Logan Capaldo napísal: > 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. > This made me smile and laugh and giggle. And also hover my hand on the button that controls the "Do not feed the troll" sign, but I'm still more amused than annoyed. Rule 1 of trolling: Never, ever be blatantly wrong about anything. David Vallner