binary constants (??)
Karl Heuer
karl at haddock.ima.isc.com
Tue Dec 5 09:31:04 AEST 1989
In article <11726 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>Fibonacci bases are more useful than this, and why limit variable radix to
>(a) constants and (b) positive radix? Those are of comparatively little
>utility.
Because, with that limitation, there exists a simple notation that works (the
proposed NrNNN). Why does strtol() have the same limitation, after all?
I like the idea of generalized radix (for D; it's too late for C) because it
includes the three common non-decimal radices (2, 8, 16) and because it does
so with a single syntax. (C currently handles only two of these, and in the
process uses two different notations, one of them rather counterintuitive.)
The fact that the same feature would allow base 21 is only marginally
relevant. To quote Chris Torek, "it is often better to get rid of specifics
and move toward abstracts."
In fact, if the syntax would permit it cleanly, I wouldn't have an upper limit
of 36, either.
Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
More information about the Comp.lang.c
mailing list