More octal questions

Jonathan M Davis jmdavisProg at gmx.com
Fri Feb 17 18:24:24 PST 2012


On Thursday, February 16, 2012 00:38:10 Stewart Gordon wrote:
> On 15/02/2012 16:41, Jonathan M Davis wrote:
> <snip>
> 
> > They're not left over at all, and they have nothing to do with octal.
> 
> <snip>
> 
> They are something to do with octal: because in D an integer literal
> beginning with 0 is defined to be octal, the compiler must interpret them
> as such if it is going to accept them at all.

They have nothing to do with octal in that they were not intentionally octal. 
I was merely using the leading 0 without thinking about it, because having 
leading 0s generally makes more sense when dealing with the date/time stuff. 
The fact that they were octal is incidental. They result in the same number 
either way, save for 08 and 09 not working.

> 
> Still, what's the long-term plan? To remove octal literals completely, and
> allow decimal literals to have leading 0s? Or to continue to allow just up
> to 07 until the end of time?
> 
> Stewart.


More information about the Digitalmars-d-learn mailing list