Pelle Månsson wrote:
Walter Bright wrote:
Yigal Chripun wrote:
in the long term, I'd like to see a more general syntax that allows
to write numbers in any base.
something like:
[base]n[number] - e.g. 16nA0FF, 2n0101, 18nGH129, etc.
also define syntax to write a list of digits:
1024n[1005, 452, 645, 16nFFF] // each digit can also be defined in
arbitrary base
Is there any language that does this?
"Integers can be specified in any base supported by Integer.parseInt(),
that is any radix from 2 to 36; for example 2r101010, 8r52, 36r16, and
42 are all the same Integer."
http://clojure.org/reader
Thanks, I also discovered that Ada supports it.
Next question, is what's the point? Any need for radices other than 2,
8, 10 or 16? I can't think of any.