Sujet : Re: The difference between strtol() and strtoul() ?
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 24. Jun 2024, 11:19:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240624131941.000057ee@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Sun, 23 Jun 2024 20:11:09 -0700
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
There's still some ambiguity for strtoull("-9999999999999999999",
NULL, 10) (that's well outside the range of a 64-bit integer). For
that to work as expected, we have to assume that the determination
that "the correct value is outside the range of representable values"
happens *before* the negation "is performed in the return type".
It's not clear that this problem is worth fixing (doing so would
likely make that section longer and perhaps more confusing).
There is nothing wrong with longer sections.
Personally I would prefer for each strtoxxx() function to have
its own description fully independent of all others. It would make
each of them easier to follow.
DRY is a good principle for programming, not necessarily for writing
Standards.