Re: VMS

Liste des GroupesRevenir à ol misc 
Sujet : Re: VMS
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.os.linux.misc
Date : 01. Jul 2025, 13:44:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1040l74$2rb81$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Tue, 01 Jul 2025 10:49:55 +0100, The Natural Philosopher wrote:

On 01/07/2025 04:26, c186282 wrote:
On 6/30/25 3:51 AM, Richard Kettlewell wrote:
 
The language spec guarantees:
   char is at least 8 bits
   short and int are at least 16 bits
   long is at least 32 bits
   long long is at least 64 bits
>
There are also some constraints on representation.
>
Server/desktop platforms usually have int=32 bits; long is a bit more
variable. It’d probably be 16 bits on a Z80 or similar where memory and
computation are in short supply.
 
   Note that "at LEAST 8 bits", "at LEAST 16 bits" is
   just BAD. Making use of modulo, roll-over, can be
   very useful sometimes. If uchars are not 8 bits
   exactly you get unrealized mistakes.
 
As I said, if its important, specify it exactly.
I am not sure that Richards' 'char is *at least* 8 bits' is correct tho...

In Kernighan & Ritchie's  "The C Programming Language", the authors note that,
on the four architectures that C had been implemented on (at the time of writing),
a char occupied 8 bits on three of them. On the fourth, a char occupied 9 bits.

So, the statement that "char is *at least* 8 bits" seems true for K&R C.

In the ISO/IEC 9899:1999 draft of the ISO C standard, paragraph 5.2.4.2.1
"Sizes of integer types", the (draft) standard carries a table of required
macros and their values, with the caveat that, for each macro, "Their
implementation-defined values shall be equal or greater in magnitude
(absolute value) to those shown, with the same sign". In this table, it
lists
 "number of bits for smallest object that is not a bit-field (byte)"
  CHAR_BIT 8
indicating that /the mimimum/ value for CHAR_BIT (and, by implication,
the mimimum size for the number of bits in a byte) is 8, and that
implementations may use larger values for CHAR_BIT.

So, the statement that "char is *at least* 8 bits" seems true for ISO C'99.

And, similar language exists in the draft of each subsequent ISO C standard,
so the statement that "char is *at least* 8 bits" seems true for all standard
implementations of C since K&R C was documented.
 
--
Lew Pitcher
"In Skills We Trust"

Date Sujet#  Auteur
14 Jun 25 * Re: VMS118Bobbie Sellers
14 Jun 25 +* Re: VMS109Andreas Eder
15 Jun 25 i`* Re: VMS108Lawrence D'Oliveiro
15 Jun 25 i +* Re: VMS11rbowman
15 Jun 25 i i`* Re: VMS10c186282
15 Jun 25 i i +* Re: VMS5The Natural Philosopher
16 Jun 25 i i i`* Re: VMS4c186282
18 Jun 25 i i i `* Re: VMS3c186282
18 Jun 25 i i i  `* Re: VMS2rbowman
18 Jun 25 i i i   `- Re: VMS1c186282
15 Jun 25 i i `* Re: VMS4rbowman
16 Jun 25 i i  `* Re: VMS3c186282
16 Jun 25 i i   `* Re: VMS2rbowman
16 Jun 25 i i    `- Re: VMS1c186282
15 Jun 25 i `* Re: VMS96c186282
18 Jun 25 i  `* Re: VMS95candycanearter07
18 Jun 25 i   `* Re: VMS94c186282
18 Jun 25 i    +* Re: VMS3candycanearter07
18 Jun 25 i    i`* Re: VMS2Rich
19 Jun 25 i    i `- Re: VMS1rbowman
19 Jun 25 i    `* Re: VMS90Richard Kettlewell
20 Jun 25 i     +* Re: VMS87c186282
20 Jun 25 i     i+* Re: VMS78Richard Kettlewell
20 Jun 25 i     ii+* Re: VMS75The Natural Philosopher
20 Jun 25 i     iii+- Re: VMS1Richard Kettlewell
20 Jun 25 i     iii+* Re: VMS72Rich
20 Jun 25 i     iiii+* Re: VMS66The Natural Philosopher
21 Jun 25 i     iiiii`* Re: VMS65Rich
21 Jun 25 i     iiiii +- Re: VMS1The Natural Philosopher
21 Jun 25 i     iiiii `* Re: VMS63rbowman
21 Jun 25 i     iiiii  `* Re: VMS62Robert Riches
21 Jun 25 i     iiiii   +- Re: VMS1c186282
21 Jun 25 i     iiiii   +- Re: VMS1rbowman
22 Jun 25 i     iiiii   `* Re: VMS59candycanearter07
22 Jun 25 i     iiiii    +* Re: VMS3Richard Kettlewell
22 Jun 25 i     iiiii    i`* Re: VMS2The Natural Philosopher
23 Jun 25 i     iiiii    i `- Re: VMS1c186282
22 Jun 25 i     iiiii    +* Re: VMS3rbowman
23 Jun 25 i     iiiii    i`* Re: VMS2candycanearter07
23 Jun 25 i     iiiii    i `- Re: VMS1rbowman
24 Jun 25 i     iiiii    +* Re: VMS51Robert Riches
24 Jun 25 i     iiiii    i+* Re: VMS6rbowman
24 Jun 25 i     iiiii    ii`* Re: VMS5rbowman
24 Jun 25 i     iiiii    ii `* Re: VMS4The Natural Philosopher
25 Jun 25 i     iiiii    ii  `* Re: VMS3c186282
25 Jun 25 i     iiiii    ii   `* Re: VMS2The Natural Philosopher
25 Jun 25 i     iiiii    ii    `- Re: VMS1c186282
24 Jun 25 i     iiiii    i+* Re: VMS7Richard Kettlewell
25 Jun 25 i     iiiii    ii`* Re: VMS6Robert Riches
25 Jun 25 i     iiiii    ii `* Re: VMS5c186282
25 Jun 25 i     iiiii    ii  +- Re: VMS1rbowman
25 Jun 25 i     iiiii    ii  `* Re: VMS3John Ames
25 Jun 25 i     iiiii    ii   `* Re: VMS2John Ames
26 Jun 25 i     iiiii    ii    `- Re: VMS1c186282
27 Jun07:00 i     iiiii    i`* Re: VMS37candycanearter07
27 Jun08:37 i     iiiii    i `* Re: VMS36Richard Kettlewell
27 Jun08:45 i     iiiii    i  +* Re: VMS4The Natural Philosopher
27 Jun18:27 i     iiiii    i  i`* Re: VMS3c186282
27 Jun19:13 i     iiiii    i  i `* Re: VMS2The Natural Philosopher
28 Jun14:16 i     iiiii    i  i  `- Re: VMS1Chris Ahlstrom
27 Jun18:24 i     iiiii    i  `* Re: VMS31c186282
27 Jun18:40 i     iiiii    i   `* Re: VMS30rbowman
27 Jun19:20 i     iiiii    i    +* Re: VMS4Lew Pitcher
28 Jun00:03 i     iiiii    i    i`* Re: VMS3Lawrence D'Oliveiro
28 Jun06:13 i     iiiii    i    i `* Re: VMS2c186282
28 Jun07:10 i     iiiii    i    i  `- Re: VMS1rbowman
27 Jun23:16 i     iiiii    i    `* Re: VMS25c186282
28 Jun08:52 i     iiiii    i     `* Re: VMS24Richard Kettlewell
29 Jun04:16 i     iiiii    i      `* Re: VMS23c186282
29 Jun08:18 i     iiiii    i       `* Re: VMS22Richard Kettlewell
30 Jun00:09 i     iiiii    i        `* Re: VMS21c186282
30 Jun08:36 i     iiiii    i         +* Re: VMS19The Natural Philosopher
30 Jun08:51 i     iiiii    i         i+* Re: VMS13Richard Kettlewell
30 Jun08:59 i     iiiii    i         ii+* Re: VMS3The Natural Philosopher
30 Jun09:33 i     iiiii    i         iii`* Re: VMS2Lawrence D'Oliveiro
30 Jun17:08 i     iiiii    i         iii `- Re: VMS1John Ames
30 Jun09:00 i     iiiii    i         ii+* Re: VMS4Richard Kettlewell
30 Jun09:24 i     iiiii    i         iii`* Re: VMS3The Natural Philosopher
30 Jun09:34 i     iiiii    i         iii `* Re: VMS2Lawrence D'Oliveiro
1 Jul04:30 i     iiiii    i         iii  `- Re: VMS1c186282
1 Jul04:26 i     iiiii    i         ii`* Re: VMS5c186282
1 Jul10:49 i     iiiii    i         ii `* Re: VMS4The Natural Philosopher
1 Jul13:44 i     iiiii    i         ii  `* Re: VMS3Lew Pitcher
2 Jul02:46 i     iiiii    i         ii   +- Re: VMS1c186282
2 Jul17:03 i     iiiii    i         ii   `- Re: VMS1Lew Pitcher
30 Jun08:54 i     iiiii    i         i+* Re: VMS2Lawrence D'Oliveiro
30 Jun19:10 i     iiiii    i         ii`- Re: VMS1rbowman
1 Jul04:12 i     iiiii    i         i`* Re: VMS3c186282
1 Jul05:02 i     iiiii    i         i `* Re: VMS2rbowman
1 Jul17:42 i     iiiii    i         i  `- Re: VMS1c186282
30 Jun08:56 i     iiiii    i         `- Re: VMS1Richard Kettlewell
27 Jun20:40 i     iiiii    `- Re: VMS1Rich
20 Jun 25 i     iiii`* Re: VMS5Richard Kettlewell
21 Jun 25 i     iiii +* Re: VMS2Rich
21 Jun 25 i     iiii i`- Re: VMS1Richard Kettlewell
21 Jun 25 i     iiii `* Re: VMS2Lawrence D'Oliveiro
21 Jun 25 i     iiii  `- Re: VMS1c186282
21 Jun 25 i     iii`- Re: VMS1c186282
21 Jun 25 i     ii`* Re: VMS2c186282
21 Jun 25 i     ii `- Re: VMS1rbowman
20 Jun 25 i     i+* Re: VMS6The Natural Philosopher
20 Jun 25 i     i`* Re: VMS2Rich
20 Jun 25 i     `* Re: VMS2Lawrence D'Oliveiro
15 Jun 25 `* Re: VMS8Rich

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal