strtoul question

Doug Gwyn gwyn at smoke.BRL.MIL
Sat May 26 02:22:02 AEST 1990


In article <UaLHQb200as9AS60EP at andrew.cmu.edu> ghoti+ at andrew.cmu.edu (Adam Stoller) writes:
>What exactly (if one can use that term) is the strtoul() function
>supposed to return when handed a string like "-987654" ?

It's supposed to return ULONG_MAX + 1 - 987654.

As I mentioned in my posting about results of the NYC X3J11 meeting,
strtoul() overflow can occur only on conversion of the magnitude,
not on the negation phase of the conversion.



More information about the Comp.std.c mailing list