Re: VMS

Liste des GroupesRevenir à ol misc 
Sujet : Re: VMS
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.misc
Date : 30. Jun 2025, 08:56:12
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvplelu0gz.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
c186282 <c186282@nnada.net> writes:
On 6/29/25 3:18 AM, Richard Kettlewell wrote:
c186282 <c186282@nnada.net> writes:
On 6/28/25 3:52 AM, Richard Kettlewell wrote:
c186282 <c186282@nnada.net> writes:
On 6/27/25 1:40 PM, rbowman wrote:
On Fri, 27 Jun 2025 13:24:06 -0400, c186282 wrote:
Some of us are old enough to remember when CPUs were not always
4/8/16/32/64 ... plus even now they've added a lot of new types like
128-bit ints. Simply ASSUMING an int is 16 bits is 'usually safe'
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
but not necessarily 'best practice' and limits future (or past)
compatibility. 'C' lets you fly free ...  but that CAN be straight
into a window pane
Assuming an int is 16 bits is not a good idea. I wouldn't even assume
a short is 16 bits
(Apart from c186282 who for some reason thinks it’s “usually safe”,
nobody here is making any such assumption about int.)
>
   Eh ? I've been saying no such thing - instead recommending
   using sizeof() kind of religiously. I remember processors
   with odd word sizes - and assume there may be more in
   the future for whatever reasons.
You wrote it above. Underlined to help you find it again.
>
>
  Mysteriously MISSING THE OTHER HALF OF THE LINE  :-)

It’s quote above in full, and the bit I didn’t underline doesn’t change
your claim that it’s “usually safe”.

If you disagree with that then argue with your past self, not me, I’m
just quoting what you wrote.

The thread is not about the size of int, etc. It’s about the specific
case of sizeof(char) in C, and that is always 1.
>
   CHAR is ONE BYTE of however many bits, but beyond that ..........
>
   Use sizeof() ...
>
   One flaw of sizeof() is that it reports in BYTES ... so,
   for example, how many BITS is that ?
I don’t see a flaw there. If you want to know the number of bytes
(in
the C sense) then that’s what sizeof does. If you want to know the
number of bits, multiply by CHAR_BIT. If you already have a number of
bytes, and you want a number of bytes, no need to multiply by anything
at all.
>
  That'll work fine.
>
  Not sure EVERY compiler has CHAR_BIT however ...

It was introduced in 1989 as a requirement for all C implementations,
anything that doesn’t have it doesn’t really have a good claim to be C
any more.

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

Date Sujet#  Auteur
14 Jun 25 * Re: VMS114Bobbie Sellers
14 Jun 25 +* Re: VMS105Andreas Eder
15 Jun 25 i`* Re: VMS104Lawrence 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: VMS92c186282
18 Jun 25 i  `* Re: VMS91candycanearter07
18 Jun 25 i   `* Re: VMS90c186282
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: VMS86Richard Kettlewell
20 Jun 25 i     +* Re: VMS83c186282
20 Jun 25 i     i+* Re: VMS74Richard Kettlewell
20 Jun 25 i     ii+* Re: VMS71The Natural Philosopher
20 Jun 25 i     iii+- Re: VMS1Richard Kettlewell
20 Jun 25 i     iii+* Re: VMS68Rich
20 Jun 25 i     iiii+* Re: VMS62The Natural Philosopher
21 Jun 25 i     iiiii`* Re: VMS61Rich
21 Jun 25 i     iiiii +- Re: VMS1The Natural Philosopher
21 Jun 25 i     iiiii `* Re: VMS59rbowman
21 Jun 25 i     iiiii  `* Re: VMS58Robert Riches
21 Jun 25 i     iiiii   +- Re: VMS1c186282
21 Jun 25 i     iiiii   +- Re: VMS1rbowman
22 Jun 25 i     iiiii   `* Re: VMS55candycanearter07
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: VMS47Robert 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 Jun06:36 i     iiiii    ii  `* Re: VMS3c186282
25 Jun07:31 i     iiiii    ii   `* Re: VMS2The Natural Philosopher
25 Jun08:08 i     iiiii    ii    `- Re: VMS1c186282
24 Jun 25 i     iiiii    i+* Re: VMS7Richard Kettlewell
25 Jun04:01 i     iiiii    ii`* Re: VMS6Robert Riches
25 Jun06:59 i     iiiii    ii `* Re: VMS5c186282
25 Jun07:52 i     iiiii    ii  +- Re: VMS1rbowman
25 Jun17:32 i     iiiii    ii  `* Re: VMS3John Ames
25 Jun17:44 i     iiiii    ii   `* Re: VMS2John Ames
26 Jun00:01 i     iiiii    ii    `- Re: VMS1c186282
27 Jun07:00 i     iiiii    i`* Re: VMS33candycanearter07
27 Jun08:37 i     iiiii    i `* Re: VMS32Richard 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: VMS27c186282
27 Jun18:40 i     iiiii    i   `* Re: VMS26rbowman
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: VMS21c186282
28 Jun08:52 i     iiiii    i     `* Re: VMS20Richard Kettlewell
29 Jun04:16 i     iiiii    i      `* Re: VMS19c186282
29 Jun08:18 i     iiiii    i       `* Re: VMS18Richard Kettlewell
30 Jun00:09 i     iiiii    i        `* Re: VMS17c186282
30 Jun08:36 i     iiiii    i         +* Re: VMS15The Natural Philosopher
30 Jun08:51 i     iiiii    i         i+* Re: VMS10Richard 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: VMS2c186282
1 Jul10:49 i     iiiii    i         ii `- Re: VMS1The Natural Philosopher
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: VMS2c186282
1 Jul05:02 i     iiiii    i         i `- Re: VMS1rbowman
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     ii+- Re: VMS1Rich
21 Jun 25 i     ii+* Re: VMS2Lawrence D'Oliveiro
21 Jun 25 i     iii`- Re: VMS1c186282
21 Jun 25 i     ii`* Re: VMS2Richard Kettlewell
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