Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: binary constants (??)
Message-ID: <1989Nov29.164913.1794@utzoo.uucp>
Organization: U of Toronto Zoology
References: <305@frf.omron.co.jp> <20830@mimsy.umd.edu> <20989@mimsy.umd.edu>
Date: Wed, 29 Nov 89 16:49:13 GMT

In article <20989@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes:
>Anyway, while specific syntaxes for specific bases (8 and 16, and
>perhaps 0b for 2 as well, in addition to the `plain' base 10) are
>all well and good, it is often better to get rid of specifics and
>move toward abstracts.  Those of you who are trying to design `D'
>(or `P') might consider dumping 0-octal and 0x-hex in favour of
>something sane, like <base>r<text>, 2r11001 = 8r31 = 25 = 16r19.

For some reason, I've never had cause to write numbers in (say) base 19.
I wonder if the added generality really buys you anything, given that it
does introduce a new class of subtle errors.  (How many programs would
notice if 16r19 was mistyped as 15r19?  Or 19r16?)
-- 
That's not a joke, that's      |     Henry Spencer at U of Toronto Zoology
NASA.  -Nick Szabo             | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
