Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Support bacteria -- it's the only culture some people have!


devel / comp.unix.programmer / Re: Why 8 bit exit status codes?

SubjectAuthor
* Why 8 bit exit status codes?Andreas Kempe
+* Re: Why 8 bit exit status codes?Scott Lurndal
|`* Re: Why 8 bit exit status codes?Andreas Kempe
| `* Re: Why 8 bit exit status codes?Scott Lurndal
|  `* Re: Why 8 bit exit status codes?Andreas Kempe
|   +- Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|   `* Re: Why 8 bit exit status codes?Keith Thompson
|    +* Re: Why 8 bit exit status codes?Andreas Kempe
|    |+- Re: Why 8 bit exit status codes?Janis Papanagnou
|    |+- Re: Why 8 bit exit status codes?Scott Lurndal
|    |+- Re: Why 8 bit exit status codes?Keith Thompson
|    |+- Re: Why 8 bit exit status codes?Rainer Weikusat
|    |`- Re: Why 8 bit exit status codes?Andreas Kempe
|    `* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|     `* Re: Why 8 bit exit status codes?Joe Pfeiffer
|      +* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|      |`- Re: Why 8 bit exit status codes?Scott Lurndal
|      +- Re: Why 8 bit exit status codes?Richard Kettlewell
|      `* Re: Why 8 bit exit status codes?Kees Nuyt
|       `* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|        `* Re: Why 8 bit exit status codes?Keith Thompson
|         +- Re: Why 8 bit exit status codes?Scott Lurndal
|         `* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|          `* Re: Why 8 bit exit status codes?Keith Thompson
|           `* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|            `* Re: Why 8 bit exit status codes?Keith Thompson
|             `* Re: Why 8 bit exit status codes?Richard Kettlewell
|              +* Re: Why 8 bit exit status codes?Rainer Weikusat
|              |+* Re: Why 8 bit exit status codes?Kaz Kylheku
|              ||`* Re: Why 8 bit exit status codes?Rainer Weikusat
|              || +* Re: Why 8 bit exit status codes?Kaz Kylheku
|              || |`* Re: Why 8 bit exit status codes?Rainer Weikusat
|              || | `* Re: Why 8 bit exit status codes?Kaz Kylheku
|              || |  `- Re: Why 8 bit exit status codes?Rainer Weikusat
|              || `* Re: Why 8 bit exit status codes?Lew Pitcher
|              ||  `- Re: Why 8 bit exit status codes?Rainer Weikusat
|              |`- Re: Why 8 bit exit status codes?Keith Thompson
|              `* Re: Why 8 bit exit status codes?Keith Thompson
|               +* Re: Why 8 bit exit status codes?Andreas Kempe
|               |`* Re: Why 8 bit exit status codes?Scott Lurndal
|               | `* Re: Why 8 bit exit status codes?Andreas Kempe
|               |  `* Re: Why 8 bit exit status codes?Scott Lurndal
|               |   `* Re: Why 8 bit exit status codes?Andreas Kempe
|               |    `- Re: Why 8 bit exit status codes?Scott Lurndal
|               `* Re: Why 8 bit exit status codes?Richard Kettlewell
|                `* Re: Why 8 bit exit status codes?Rainer Weikusat
|                 `* Re: Why 8 bit exit status codes?Richard Kettlewell
|                  +* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|                  |`- Re: Why 8 bit exit status codes?Richard Kettlewell
|                  `* Re: Why 8 bit exit status codes?Rainer Weikusat
|                   `* Re: Why 8 bit exit status codes?Keith Thompson
|                    `* Re: Why 8 bit exit status codes?Rainer Weikusat
|                     +* Re: Why 8 bit exit status codes?Keith Thompson
|                     |`* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|                     | +* Re: Why 8 bit exit status codes?Scott Lurndal
|                     | |`- Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
|                     | `- Re: Why 8 bit exit status codes?Keith Thompson
|                     `- Re: Why 8 bit exit status codes?Kaz Kylheku
`* Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
 `* Re: Why 8 bit exit status codes?Keith Thompson
  +- Re: Why 8 bit exit status codes?Lawrence D'Oliveiro
  `- Re: Why 8 bit exit status codes?Rainer Weikusat

Pages:123
Re: Why 8 bit exit status codes?

<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11311&group=comp.unix.programmer#11311

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: inva...@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Wed, 07 Feb 2024 20:20:12 +0000
Organization: terraraq NNTP server
Message-ID: <wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<EP8vN.39265$Wbff.38272@fx37.iad>
<upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="58976"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:5rLQZrY/qEvlR9BsyT5cs9zmaIc=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Wed, 7 Feb 2024 20:20 UTC

Rainer Weikusat <rweikusat@talktalk.net> writes:
> Richard Kettlewell <invalid@invalid.invalid> writes:
>> “char” isn’t just a random string of symbols. It’s obvious both from the
>> name and the way it’s used in the language that it’s intended to
>> represent characters, not just small integer values.
>
> Computers have absolutely no idea of "characters". They handle numbers,
> integer numbers in this case, and humans then interpret them as
> characters based on some convention for encoding characters as
> integers. Hence, a data type suitable for holding an encoded character
> (ie, an integer value from 0 - 127 for the case in question) is not the
> same as a character.

Language designers do, however, have an idea of “characters”.

--
https://www.greenend.org.uk/rjk/

Re: Why 8 bit exit status codes?

<uq0qsp$1j15l$8@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11319&group=comp.unix.programmer#11319

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Wed, 7 Feb 2024 20:58:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uq0qsp$1j15l$8@dont-email.me>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<EP8vN.39265$Wbff.38272@fx37.iad> <upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad> <upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com> <upmbnj$39vft$2@dont-email.me>
<1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me> <87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me> <878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me> <87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 7 Feb 2024 20:58:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b7e5e48814a9d4abb8837a79a8d36f18";
logging-data="1672373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Vmx89Y1RwzQu2cEwF7nVA"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:/9CIJ9W0QdbCGRv8PbA1pyfQkQ8=
 by: Lawrence D'Oliv - Wed, 7 Feb 2024 20:58 UTC

On Wed, 07 Feb 2024 20:20:12 +0000, Richard Kettlewell wrote:

> Language designers do, however, have an idea of “characters”.

Unicode uses the terms “grapheme” and “text element”. Actually it also
uses “character”, but it seems less clear on what that means. It is not
the same as a “code point” or “glyph”.

<https://www.unicode.org/faq/char_combmark.html>

Re: Why 8 bit exit status codes?

<wwvttmj6w17.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11334&group=comp.unix.programmer#11334

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: inva...@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 11:21:56 +0000
Organization: terraraq NNTP server
Message-ID: <wwvttmj6w17.fsf@LkoBDZeT.terraraq.uk>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<EP8vN.39265$Wbff.38272@fx37.iad>
<upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk> <uq0qsp$1j15l$8@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="3450"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:h2DafD4bDfvbrRWIBgMEgA8+Oq4=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Thu, 8 Feb 2024 11:21 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Wed, 07 Feb 2024 20:20:12 +0000, Richard Kettlewell wrote:
>
>> Language designers do, however, have an idea of “characters”.
>
> Unicode uses the terms “grapheme” and “text element”. Actually it also
> uses “character”, but it seems less clear on what that means. It is not
> the same as a “code point” or “glyph”.
>
> <https://www.unicode.org/faq/char_combmark.html>

Sure, but this was all happening in the 1970s, long before Unicode
existed.

K&R1 explicitly says char is “capable of holding one character in the
local character set” (and mentions EBCDIC as a concrete example on the
same page - the problem must have been obvious already).

--
https://www.greenend.org.uk/rjk/

Re: Why 8 bit exit status codes?

<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11339&group=comp.unix.programmer#11339

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 16:34:10 +0000
Lines: 21
Message-ID: <87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<EP8vN.39265$Wbff.38272@fx37.iad>
<upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net uGqGzNKqP+dbBnLDL7HPMQYI9HrymMuPLEc1aBDW9PKAx7Xjw=
Cancel-Lock: sha1:Wu29qIsKXCoi9ZgVJZx0pjguQeI= sha1:x3Lrb6ySGZDzWt3fRauKg978SqA= sha256:RIm4GLeymNvOMqHRvYwR1/HIrXmvHv8Zd580LGZxmSo=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Thu, 8 Feb 2024 16:34 UTC

Richard Kettlewell <invalid@invalid.invalid> writes:
> Rainer Weikusat <rweikusat@talktalk.net> writes:
>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>> “char” isn’t just a random string of symbols. It’s obvious both from the
>>> name and the way it’s used in the language that it’s intended to
>>> represent characters, not just small integer values.
>>
>> Computers have absolutely no idea of "characters". They handle numbers,
>> integer numbers in this case, and humans then interpret them as
>> characters based on some convention for encoding characters as
>> integers. Hence, a data type suitable for holding an encoded character
>> (ie, an integer value from 0 - 127 for the case in question) is not the
>> same as a character.
>
> Language designers do, however, have an idea of “characters”.

I don't quite understand what that's supposed to communicate. Insofar
the machine is concerned, a character is nothig but an integer and a
data type sufficient to hold a characters is thus necessarily an integer
type of some size. In a language without unsigned integer types, it'll
necessarily also be an signed integer type.

Re: Why 8 bit exit status codes?

<87zfwaganm.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11341&group=comp.unix.programmer#11341

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 08:53:33 -0800
Organization: None to speak of
Lines: 32
Message-ID: <87zfwaganm.fsf@nosuchdomain.example.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<EP8vN.39265$Wbff.38272@fx37.iad>
<upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="93a22936c47851e9e74d3b604d07c7bb";
logging-data="2164664"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xOuN9pCyNccBfXiyKHHAD"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:X3W9haB2RBQm2caOQgBydK7/V8I=
sha1:nBKCdjC3eukDhB0dJtDl62O8GII=
 by: Keith Thompson - Thu, 8 Feb 2024 16:53 UTC

Rainer Weikusat <rweikusat@talktalk.net> writes:
> Richard Kettlewell <invalid@invalid.invalid> writes:
>> Rainer Weikusat <rweikusat@talktalk.net> writes:
>>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>>> “char” isn’t just a random string of symbols. It’s obvious both from the
>>>> name and the way it’s used in the language that it’s intended to
>>>> represent characters, not just small integer values.
>>>
>>> Computers have absolutely no idea of "characters". They handle numbers,
>>> integer numbers in this case, and humans then interpret them as
>>> characters based on some convention for encoding characters as
>>> integers. Hence, a data type suitable for holding an encoded character
>>> (ie, an integer value from 0 - 127 for the case in question) is not the
>>> same as a character.
>>
>> Language designers do, however, have an idea of “characters”.
>
> I don't quite understand what that's supposed to communicate. Insofar
> the machine is concerned, a character is nothig but an integer and a
> data type sufficient to hold a characters is thus necessarily an integer
> type of some size. In a language without unsigned integer types, it'll
> necessarily also be an signed integer type.

Early C (pre-K&R1) didn't explicitly have unsigned integer types, but
char was effectively unsigned in some implementations, in that
converting a char value to int would zero-fill the result rather than
doing sign-extension.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Why 8 bit exit status codes?

<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11347&group=comp.unix.programmer#11347

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 17:46:20 +0000
Lines: 43
Message-ID: <87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<upjho8$hek$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net G/pH7c1Dc5aaH04/diZPcAK0deZL+O9qZIt0V7wvGJFt2wTfQ=
Cancel-Lock: sha1:XNyhEtGSsBHrouvQNXJ3TqFjop8= sha1:UfAMfYiJklKRccqdguAdvygK0fw= sha256:6wN9oBfrhwQltYQc9kOW4ZNrLoQAh7SBFD/o9jbu18k=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Thu, 8 Feb 2024 17:46 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Rainer Weikusat <rweikusat@talktalk.net> writes:
>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>> Rainer Weikusat <rweikusat@talktalk.net> writes:
>>>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>>>> “char” isn’t just a random string of symbols. It’s obvious both from the
>>>>> name and the way it’s used in the language that it’s intended to
>>>>> represent characters, not just small integer values.
>>>>
>>>> Computers have absolutely no idea of "characters". They handle numbers,
>>>> integer numbers in this case, and humans then interpret them as
>>>> characters based on some convention for encoding characters as
>>>> integers. Hence, a data type suitable for holding an encoded character
>>>> (ie, an integer value from 0 - 127 for the case in question) is not the
>>>> same as a character.
>>>
>>> Language designers do, however, have an idea of “characters”.
>>
>> I don't quite understand what that's supposed to communicate. Insofar
>> the machine is concerned, a character is nothig but an integer and a
>> data type sufficient to hold a characters is thus necessarily an integer
>> type of some size. In a language without unsigned integer types, it'll
>> necessarily also be an signed integer type.
>
> Early C (pre-K&R1) didn't explicitly have unsigned integer types, but
> char was effectively unsigned in some implementations, in that
> converting a char value to int would zero-fill the result rather than
> doing sign-extension.

According to Ritchie's "The Development of the C Language"

,----
| During 1973-1980, the language grew a bit: the type structure gained
| unsigned
|
| [...]
|
| the similarity of the arithmetic properties of character pointers and
| unsigned integers made it hard to resist the temptation to identify
| them. The unsigned types were added to make unsigned arithmetic
| available without confusing it with pointer manipulation. Similarly, the
| early language condoned assignments between integers and pointers
`----

Re: Why 8 bit exit status codes?

<87mssag6hq.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11348&group=comp.unix.programmer#11348

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 10:23:29 -0800
Organization: None to speak of
Lines: 75
Message-ID: <87mssag6hq.fsf@nosuchdomain.example.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="93a22936c47851e9e74d3b604d07c7bb";
logging-data="2194422"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/flnfanLZjGNJ0VTu7YrB5"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:AXwfJDsp2r+xMe9L6YlhtxYhJM4=
sha1:VE/EcY21T6MG4P/jrXcS1x3271s=
 by: Keith Thompson - Thu, 8 Feb 2024 18:23 UTC

Rainer Weikusat <rweikusat@talktalk.net> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Rainer Weikusat <rweikusat@talktalk.net> writes:
>>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>>> Rainer Weikusat <rweikusat@talktalk.net> writes:
>>>>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>>>>> “char” isn’t just a random string of symbols. It’s obvious both from the
>>>>>> name and the way it’s used in the language that it’s intended to
>>>>>> represent characters, not just small integer values.
>>>>>
>>>>> Computers have absolutely no idea of "characters". They handle numbers,
>>>>> integer numbers in this case, and humans then interpret them as
>>>>> characters based on some convention for encoding characters as
>>>>> integers. Hence, a data type suitable for holding an encoded character
>>>>> (ie, an integer value from 0 - 127 for the case in question) is not the
>>>>> same as a character.
>>>>
>>>> Language designers do, however, have an idea of “characters”.
>>>
>>> I don't quite understand what that's supposed to communicate. Insofar
>>> the machine is concerned, a character is nothig but an integer and a
>>> data type sufficient to hold a characters is thus necessarily an integer
>>> type of some size. In a language without unsigned integer types, it'll
>>> necessarily also be an signed integer type.
>>
>> Early C (pre-K&R1) didn't explicitly have unsigned integer types, but
>> char was effectively unsigned in some implementations, in that
>> converting a char value to int would zero-fill the result rather than
>> doing sign-extension.
>
> According to Ritchie's "The Development of the C Language"
>
> ,----
> | During 1973-1980, the language grew a bit: the type structure gained
> | unsigned
> |
> | [...]
> |
> | the similarity of the arithmetic properties of character pointers and
> | unsigned integers made it hard to resist the temptation to identify
> | them. The unsigned types were added to make unsigned arithmetic
> | available without confusing it with pointer manipulation. Similarly, the
> | early language condoned assignments between integers and pointers
> `----

Right. K&R1 (1978) had "unsigned", but only for unsigned int. Still,
the signedness of char was effectively implementation-defined, though it
wasn't stated in those terms.

From K&R1:

A character or a short integer may be used wherever an
integer may be used. In all cases the value is converted to
an integer. Conversion of a shorter integer to a longer always
involves sign extension; integers are signed quantities. Whether
or not sign-extension occurs for characters is machine dependent,
but it is guaranteed that a member of the standard character
set is non-negative. Of the machines treated by this manual,
only the PDP-11 sign-extends. On the PDP-11, character variables
range in value from -128 to 127; the characters of the ASCII
alphabet are all positive. A character constant specified with
an octal escape suffers sign extension and may appear negative;
for example, '\377' has the value -1.

The sentence "Whether or not sign-extension occurs for characters is
machine dependent" might be written in more modern terms as "The
signedness of char is implementation-defined".

signed char and unsigned char (and unsigned short and unsigned long)
were added in ANSI C 1989, possibly earlier.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Why 8 bit exit status codes?

<20240208112705.963@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11349&group=comp.unix.programmer#11349

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 8 Feb 2024 19:54:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <20240208112705.963@kylheku.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<upjho8$hek$1@nyheter.lysator.liu.se> <w3cvN.322279$c3Ea.250268@fx10.iad>
<upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com> <upmbnj$39vft$2@dont-email.me>
<1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me> <87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me> <878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me> <87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Thu, 8 Feb 2024 19:54:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="163263dc92baed57fd9aed84cf1a8c15";
logging-data="2227171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iEazo8FQ/ycQbi+nXGJWf7xJFULn9Tm4="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:hkSvB4ZklVuqeFXYrSKFuKSsZXY=
 by: Kaz Kylheku - Thu, 8 Feb 2024 19:54 UTC

On 2024-02-08, Rainer Weikusat <rweikusat@talktalk.net> wrote:
> According to Ritchie's "The Development of the C Language"
>
> ,----
>| During 1973-1980, the language grew a bit: the type structure gained
>| unsigned
>|
>| [...]
>|
>| the similarity of the arithmetic properties of character pointers and
>| unsigned integers made it hard to resist the temptation to identify
>| them. The unsigned types were added to make unsigned arithmetic
>| available without confusing it with pointer manipulation. Similarly, the
>| early language condoned assignments between integers and pointers
> `----

It seems like a very odd rationale, given how things played out.

The difference between two pointers ended up signed (ptrdiff_t).
So pointer arithmetic doesn't work exactly like unsigned. That's mostly
a good thing, except that pointers farther from each other than half the
address space cannot be subtracted. (ISO C mostly takes that away anyway
since pointers to different objects may only be compared for exact
equality, and canno tbe subtracted. If no object is half the address
space or larger, subtraction overflow will never occur.)

Moreover, unsigned ended up necessary for representing a simple byte
in a nice way.

Not only that, but unsigned types are useful for bit manipulation,
without running into nonportable behaviors around shifting into and out
of the sign bit.

If you have a 32 bit int and want a 32 bit field, you want unsigned int.

Very odd to see the existence of unsigned math justified in terms of
some story about pointers.

It seems Ritchie really didn't think much about portability; he
probabably thought it was fine to do 1 << 15 with a 16 bit signed int
to calculate a mask for the highest bit, since that happened to work in
the systems he designed. If someone wanted C on their weird machine
where that misbehaves, or produces an alternative zero that compares
equal to regular zero, that was their problem.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Why 8 bit exit status codes?

<uq3ip5$25287$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11352&group=comp.unix.programmer#11352

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 8 Feb 2024 21:57:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uq3ip5$25287$1@dont-email.me>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<w3cvN.322279$c3Ea.250268@fx10.iad> <upjmam$hek$2@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com> <upmbnj$39vft$2@dont-email.me>
<1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me> <87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me> <878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me> <87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
<87mssag6hq.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 8 Feb 2024 21:57:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90dcf57beced22e986224bda49ef3a06";
logging-data="2263303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9F2HgltNybt6qnTJgD5mu"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:2ajRcXFYrGA+aF4XirVEkpdmUAY=
 by: Lawrence D'Oliv - Thu, 8 Feb 2024 21:57 UTC

On Thu, 08 Feb 2024 10:23:29 -0800, Keith Thompson wrote:

> The sentence "Whether or not sign-extension occurs for characters is
> machine dependent" might be written in more modern terms as "The
> signedness of char is implementation-defined".
>
> signed char and unsigned char (and unsigned short and unsigned long)
> were added in ANSI C 1989, possibly earlier.

Here’s an odd thing: what happens when you shift a signed int? K&R allows
left-shift with the obvious meaning, and says that, for right-shift,
whether the top bits are zero-filled or sign-extended is implementation-
defined; newer C specs say that left-shifting a negative value is simply
“undefined”, and right-shifting a negative value is “implementation-
defined”.

Re: Why 8 bit exit status codes?

<wCcxN.72071$zqTf.39741@fx35.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11353&group=comp.unix.programmer#11353

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx35.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Why 8 bit exit status codes?
Newsgroups: comp.unix.programmer
References: <upj3rq$da8$1@nyheter.lysator.liu.se> <wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk> <87sf25if5u.fsf@nosuchdomain.example.com> <wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk> <87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com> <wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk> <87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com> <87zfwaganm.fsf@nosuchdomain.example.com> <87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com> <87mssag6hq.fsf@nosuchdomain.example.com> <uq3ip5$25287$1@dont-email.me>
Lines: 19
Message-ID: <wCcxN.72071$zqTf.39741@fx35.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 08 Feb 2024 22:30:52 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 08 Feb 2024 22:30:52 GMT
X-Received-Bytes: 1979
 by: Scott Lurndal - Thu, 8 Feb 2024 22:30 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Thu, 08 Feb 2024 10:23:29 -0800, Keith Thompson wrote:
>
>> The sentence "Whether or not sign-extension occurs for characters is
>> machine dependent" might be written in more modern terms as "The
>> signedness of char is implementation-defined".
>>
>> signed char and unsigned char (and unsigned short and unsigned long)
>> were added in ANSI C 1989, possibly earlier.
>
>Here’s an odd thing: what happens when you shift a signed int? K&R allows
>left-shift with the obvious meaning, and says that, for right-shift,
>whether the top bits are zero-filled or sign-extended is implementation-
>defined; newer C specs say that left-shifting a negative value is simply
>“undefined”, and right-shifting a negative value is “implementation-
>defined”.

There were extant hardware implementations exhibiting both behaviors. So they
made the behavior implementation-defined in the compiler.

Re: Why 8 bit exit status codes?

<87eddmfv16.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11354&group=comp.unix.programmer#11354

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 08 Feb 2024 14:31:01 -0800
Organization: None to speak of
Lines: 25
Message-ID: <87eddmfv16.fsf@nosuchdomain.example.com>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<87cytenve7.fsf@nosuchdomain.example.com>
<upmbnj$39vft$2@dont-email.me> <1bwmrkaoow.fsf@pfeifferfamily.net>
<qv52si5cvkajlf7fdcidur6elhism0u2su@dim53.demon.nl>
<upro72$g01t$2@dont-email.me>
<87cytajwqe.fsf@nosuchdomain.example.com>
<ups07m$h6mt$1@dont-email.me>
<878r3yjpbr.fsf@nosuchdomain.example.com>
<ups7vs$i2ic$5@dont-email.me>
<87zfwei6n2.fsf@nosuchdomain.example.com>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
<87mssag6hq.fsf@nosuchdomain.example.com>
<uq3ip5$25287$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="93a22936c47851e9e74d3b604d07c7bb";
logging-data="2287684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rHcUMk9Lh+l4fi5VXaxBZ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:wbEbTMHY55hMQmIT3Utf8Eine3k=
sha1:uL8tenro5yd84pwu3PTm2PxnEpg=
 by: Keith Thompson - Thu, 8 Feb 2024 22:31 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Thu, 08 Feb 2024 10:23:29 -0800, Keith Thompson wrote:
>> The sentence "Whether or not sign-extension occurs for characters is
>> machine dependent" might be written in more modern terms as "The
>> signedness of char is implementation-defined".
>>
>> signed char and unsigned char (and unsigned short and unsigned long)
>> were added in ANSI C 1989, possibly earlier.
>
> Here’s an odd thing: what happens when you shift a signed int? K&R allows
> left-shift with the obvious meaning, and says that, for right-shift,
> whether the top bits are zero-filled or sign-extended is implementation-
> defined; newer C specs say that left-shifting a negative value is simply
> “undefined”, and right-shifting a negative value is “implementation-
> defined”.

True. On the other hand, there are no shift operations on character
types (or short or unsigned short). The integer promotions are
performed on both operands of "<<" or ">>", so the value that's shifted
is at least as wide as int or unsigned int.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Why 8 bit exit status codes?

<uq3nvu$26ubh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11357&group=comp.unix.programmer#11357

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: Re: Why 8 bit exit status codes?
Date: Thu, 8 Feb 2024 23:26:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uq3nvu$26ubh$1@dont-email.me>
References: <upj3rq$da8$1@nyheter.lysator.liu.se>
<wwvttmlv87q.fsf@LkoBDZeT.terraraq.uk>
<87sf25if5u.fsf@nosuchdomain.example.com>
<wwvplx8y3bt.fsf@LkoBDZeT.terraraq.uk>
<87r0hoqokw.fsf@doppelsaurus.mobileactivedefense.com>
<wwvy1bwjabn.fsf@LkoBDZeT.terraraq.uk>
<87mssaewzh.fsf@doppelsaurus.mobileactivedefense.com>
<87zfwaganm.fsf@nosuchdomain.example.com>
<87il2yetn7.fsf@doppelsaurus.mobileactivedefense.com>
<87mssag6hq.fsf@nosuchdomain.example.com> <uq3ip5$25287$1@dont-email.me>
<wCcxN.72071$zqTf.39741@fx35.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 8 Feb 2024 23:26:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b81b1b5b0886ece37827f7a23070dda";
logging-data="2324849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sQ4d+hIHd41tZ+ZNOOi7u"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:5itLSKdFDWWdrtuK6LUYnF9wj9o=
 by: Lawrence D'Oliv - Thu, 8 Feb 2024 23:26 UTC

On Thu, 08 Feb 2024 22:30:52 GMT, Scott Lurndal wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>>Here’s an odd thing: what happens when you shift a signed int? K&R allows
>>left-shift with the obvious meaning, and says that, for right-shift,
>>whether the top bits are zero-filled or sign-extended is implementation-
>>defined; newer C specs say that left-shifting a negative value is simply
>>“undefined”, and right-shifting a negative value is “implementation-
>>defined”.
>
> There were extant hardware implementations exhibiting both behaviors.

Except the current spec doesn’t mention a choice between two behaviours.

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor