On Mon, 2002-10-28 at 16:44, Mark J. Reed wrote:
> On 2002-10-28 at 16:39:10, brian wheeler wrote:
> > [The below is actually from Larry, not Michael]
> > > explicit radix specifications for integers:
> > >      0123            - decimal
> > >    2:0110            - binary     [also b:0110?]
> > >    8:123             - octal      [also o:123?]
> > >    16:123            - hex        [also h:123?]
> > >    256:192.168.1.0   - base 256
> > >    (...etc...)
> The post that started this thread was a complaint about
> leading 0 meaning octal - which is counterintuitive to everyone the
> first time they come across it in C or Perl or Java or wherever.
> So yes, as indicated by the first line above, if
> this proposal were to be adopted (and again, it's just Larry thinking out
> loud), 0123 would be 123 decimal, not 123 octal = 83 decimal.
>

That's fair..especially since the only place most people use octal is
mkdir and chmod.


> However I don't see any reason not to allow 0x as a synonym for
> 16: (or 16# or whatever the radix syntax would be).

That's probably a good idea to make it a synonym since hex notation is
used much more often than octal.

Thanks for the clarification!
Brian



> 
> -- 
> Mark REED                    | CNN Internet Technology
> 1 CNN Center Rm SW0831G      | [EMAIL PROTECTED]
> Atlanta, GA 30348      USA   | +1 404 827 4754


Reply via email to