Sujet : Re: The difference between strtol() and strtoul() ?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 23. Jun 2024, 00:43:47
Autres entêtes
Organisation : None to speak of
Message-ID : <87h6dkv8zw.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Michael S <
already5chosen@yahoo.com> writes:
On Fri, 21 Jun 2024 10:38:51 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Ben Bacarisse <ben@bsb.me.uk> writes:
Michael S <already5chosen@yahoo.com> writes:
[...]
Which are? uunfortunately, not part of C standard.
>
Not sure if that '?' is just a typo. Anyway, yes they are both
part of the C standard.
strto[u]l[l] are declared in <stdlib.h> strtoimax and strtoumax are
declared in <inttypes.h>, which can make them easy to miss.
>
May be, that is the reason. But frankly, I expected that
cppreference.com will do better. As a minimum, strtoimax should have
ben listed in "See also" section on this page:
https://en.cppreference.com/w/c/string/byte/strtol
I agree, and I'm going to suggest that change. (Editing of the page is
currently disabled for new users due to vandalism and I've had some
problems with my account.)
But <
https://en.cppreference.com/w/c/string/byte/strtoimax> does
indicate that both functions are declared in <inttypes.h> and has
references to the C99 and later standards.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */