Deutsch English Français Italiano |
<865xu6jffq.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: Hex string literals (was Re: C23 thoughts and opinions) Date: Tue, 18 Jun 2024 11:04:09 -0700 Organization: A noiseless patient Spider Lines: 32 Message-ID: <865xu6jffq.fsf@linuxsc.com> References: <v2l828$18v7f$1@dont-email.me> <87msoh5uh6.fsf@nosuchdomain.example.com> <f08d2c9f-5c2e-495d-b0bd-3f71bd301432@gmail.com> <v2nbp4$1o9h6$1@dont-email.me> <v2ng4n$1p3o2$1@dont-email.me> <87y18047jk.fsf@nosuchdomain.example.com> <87msoe1xxo.fsf@nosuchdomain.example.com> <v2sh19$2rle2$2@dont-email.me> <87ikz11osy.fsf@nosuchdomain.example.com> <v2v59g$3cr0f$1@dont-email.me> <87plt8yxgn.fsf@nosuchdomain.example.com> <v31rj5$o20$1@dont-email.me> <87cyp6zsen.fsf@nosuchdomain.example.com> <v34gi3$j385$1@dont-email.me> <874jahznzt.fsf@nosuchdomain.example.com> <v36nf9$12bei$1@dont-email.me> <87v82b43h6.fsf@nosuchdomain.example.com> <87iky830v7.fsf_-_@nosuchdomain.example.com> <v4pd8t$m52o$1@dont-email.me> <86v826kdxn.fsf@linuxsc.com> <20240618123940.00007f1a@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Tue, 18 Jun 2024 20:04:10 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d4aeba7b4aaab0d94b94221c1561c3e8"; logging-data="1536444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19z5Jqnmw5nXGjIRyXcq42KA/aBy8EJliE=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:tzmU440sJhEzrP6FOwtbtEURZ+s= sha1:vo4eNRKw2OKKlUcj7wswEP0MMn8= Bytes: 3154 Michael S <already5chosen@yahoo.com> writes: > On Mon, 17 Jun 2024 22:39:00 -0700 > Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: > >> bart <bc@freeuk.com> writes: >> >>> AFAIK nobody uses octal anymore. >> >> There are circumstances where being able to write constants >> in octal is useful. It also would be nice to be able to >> write constants in base 4 and base 32 (because 5 is half >> of 10). I don't have occasion to prefer octal very often >> but I'm glad it's there for those times when I do. > > Ada/VHDL permits any base from 2 to 16. They didn't go as far up as > 32. > I would imagine that reading base 32 number would take time to become > accustomed. > Besides, using I and O as digits is problematic because of visual > similarity to 1 an 0. Using l is problematic both because of visual > similarity to 1 and because of clash with existing use as suffix. It would be nice (in some circumstances) to be able to write constants in base 32. That doesn't mean I'm proposing that such constants be written using the common 10-digits-22-letters form of representation. Realistically I think it's unlikely that the C standard will ever add a base-32 form for integer constants, and even if it did I wouldn't want to wait that long before it could be used reliably. So all I'm saying is that base-32 constants are sometimes useful, even if they aren't incorporated into standard C.