| Deutsch English Français Italiano |
|
<20240623230509.919@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: The difference between strtol() and strtoul() ? Date: Mon, 24 Jun 2024 06:05:33 -0000 (UTC) Organization: A noiseless patient Spider Lines: 21 Message-ID: <20240623230509.919@kylheku.com> References: <v51d1l$2fklr$1@news.xmission.com> <v540t9$2gsdu$1@news.xmission.com> <20240621182839.00000dc4@yahoo.com> <20240621185314.00004fda@yahoo.com> <87o77uqktg.fsf@bsb.me.uk> <20240623121952.00005fa9@yahoo.com> <87r0cnq46s.fsf@bsb.me.uk> <20240623153219.000009b0@yahoo.com> <87jzifpth6.fsf@bsb.me.uk> <864j9jh77d.fsf@linuxsc.com> <87r0cntga9.fsf@nosuchdomain.example.com> <87o77rnrt2.fsf@bsb.me.uk> <20240623191452.334@kylheku.com> <20240623192959.369@kylheku.com> <87a5jbt4o7.fsf@nosuchdomain.example.com> Injection-Date: Mon, 24 Jun 2024 08:05:34 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0a91c74ce60a0e44ab75e91b4c3a6a2f"; logging-data="851017"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9dao6O+40hJ9lZfpbYorwwRN5b7QNwD0=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:XmhMmpM60Hrd1x36sGtQG+mF7V0= Bytes: 2250 On 2024-06-24, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: > Kaz Kylheku <643-408-1753@kylheku.com> writes: >> On 2024-06-24, Kaz Kylheku <643-408-1753@kylheku.com> wrote: >>> If the negation, which is a positive value, cannot be represented in the >>> type, that implies it is out of range. The required behavior for a >>> positive out-of-range value is to return LLONG_MAX and set errno to >>> ERANGE. >> >> Errr, what am I saying! The negation, which is a negative value, >> cannot be represented in the type, so the required behavior is to >> return LLONG_MIN and set errno to negative. > > You mean "and set errno to ERANGE". Once you screw up and start correcting yourself, there is no end to the long tail of erors. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca