Deutsch   English   Français   Italiano  
<87a5jbt4o7.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: The difference between strtol() and strtoul() ?
Date: Sun, 23 Jun 2024 20:12:24 -0700
Organization: None to speak of
Lines: 16
Message-ID: <87a5jbt4o7.fsf@nosuchdomain.example.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>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Mon, 24 Jun 2024 05:12:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0a690d6294358a2c4bce5879f14e083a";
	logging-data="799792"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/rE/gYBdcwPW/Bta+HaOWZ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:6KGLTYmx5Ehqtv66JiyimxDL06I=
	sha1:VvlMTuVjRjgKOOkeHf1gljynRT0=
Bytes: 2091

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".

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */