Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lew Pitcher Newsgroups: comp.os.linux.misc Subject: Re: VMS Date: Fri, 27 Jun 2025 18:20:31 -0000 (UTC) Organization: A noiseless patient Spider Lines: 35 Message-ID: <103mndf$57lc$1@dont-email.me> References: <87tt4i9nw5.fsf@eder.anydns.info> <102l0h9$fjtb$5@dont-email.me> <4_GdncCsf-Nqe8n1nZ2dnZfqnPSdnZ2d@giganews.com> <103392c$lpbg$5@dont-email.me> <1033o4a$1qj6$3@dont-email.me> <1033tv1$3aqu$3@dont-email.me> <1034pj8$a74s$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 27 Jun 2025 20:20:31 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f3d45a10181959f35276219338617be3"; logging-data="171692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1uXfQ1CgE72cn3UObF1srXdSuNXeFD6g=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:Ixzmxy460WvLN3xerzMVeFrIZNI= On Fri, 27 Jun 2025 17:40:02 +0000, 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 It would depend on the programming language you use, it's conformance to standards, and which standard it conforms to. The ISO C standards, for instance, dictate that - a char is at least 8 bits wide, - an unsigned short int must be able to, at least, express values between 0 and 65535, and - an unsigned int must be able to, at least, express values between 0 and 65535 These last two imply that both unsigned short int and int are at least 16 bits wide. At least, according to the standard. Now, you /can/ have a C compiler that DOES NOT comply, PARTIALLY complies, or complies (WHEN REQUESTED) to the ISO C standard; for those compilers, "you pay your money, and you take your chances" HTH -- Lew Pitcher "In Skills We Trust"