More octal questions

Stewart Gordon smjg_1998 at yahoo.com
Wed Feb 15 16:38:10 PST 2012


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.

Of course, under current D2 without -d, the compiler rejects zero-led integer literals 
greater than 07.  But it's because of this octal legacy that it accepts up to 07 but not 
08, 09 or 010.

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