Sujet : Re: The difference between strtol() and strtoul() ?
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.lang.cDate : 20. Jun 2024, 16:26:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v51hnr$2j1fo$2@dont-email.me>
References : 1
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Thu, 20 Jun 2024 14:06:45 +0000, Kenny McCormack wrote:
[snip]
P.S. Why isn't there a strtoi() or strtou() ? I know, of course, that
there is atoi(), but that doesn't have the error checking capability that
the strto* functions have.
I don't know, but I'd /guess/ that, because the strto*l() functions return
a value that can easily be range-checked and (possibly) truncated to fit in
an int, the ISO committee didn't see any reason add another set of specialized
functions.
-- Lew Pitcher"In Skills We Trust"