Re: More octal questions

2012-02-17 Thread Jonathan M Davis
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

Re: More octal questions

2012-02-17 Thread Daniel Murphy
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.508.1329531876.20196.digitalmars-d-le...@puremagic.com... 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

Re: More octal questions

2012-02-15 Thread Andrej Mitrovic
Where do you see those literals? I'm only seeing strings.

Re: More octal questions

2012-02-15 Thread Timon Gehr
On 02/15/2012 09:30 AM, Andrej Mitrovic wrote: Where do you see those literals? I'm only seeing strings. Line 8322: _assertPred!==(SysTime.fromISOString(20101222T172201), SysTime(DateTime(2010, 12, 22, 17, 22, 01)));

Re: More octal questions

2012-02-15 Thread H. S. Teoh
On Wed, Feb 15, 2012 at 02:42:04PM +0100, Timon Gehr wrote: On 02/15/2012 09:30 AM, Andrej Mitrovic wrote: Where do you see those literals? I'm only seeing strings. Line 8322: _assertPred!==(SysTime.fromISOString(20101222T172201), SysTime(DateTime(2010, 12, 22, 17, 22, 01))); That unittest

Re: More octal questions

2012-02-15 Thread Jonathan M Davis
On Wednesday, February 15, 2012 08:32:55 H. S. Teoh wrote: On Wed, Feb 15, 2012 at 02:42:04PM +0100, Timon Gehr wrote: On 02/15/2012 09:30 AM, Andrej Mitrovic wrote: Where do you see those literals? I'm only seeing strings. Line 8322:

Re: More octal questions

2012-02-15 Thread H. S. Teoh
On Wed, Feb 15, 2012 at 08:41:33AM -0800, Jonathan M Davis wrote: [...] They're not left over at all, and they have nothing to do with octal. It's simply a matter of the natural thing for me to do when dealing with dates and times is to put the 0 in front of single digit numbers. You'll note

Re: More octal questions

2012-02-15 Thread Adam D. Ruppe
On Wednesday, 15 February 2012 at 17:48:03 UTC, H. S. Teoh wrote: Yes, I guessed as much. Which brings up a question of what exactly octal deprecation will entail. The goal here is to make sure things either do what they look like, or don't compile. 010 doesn't do what it looks like to a

Re: More octal questions

2012-02-15 Thread H. S. Teoh
On Wed, Feb 15, 2012 at 06:52:09PM +0100, Adam D. Ruppe wrote: [...] The goal here is to make sure things either do what they look like, or don't compile. 010 doesn't do what it looks like to a person used to decimal; it is a C octal literal for decimal 8. So it is deprecated. But,

Re: More octal questions

2012-02-15 Thread Jonathan M Davis
On Wednesday, February 15, 2012 18:52:09 Adam D. Ruppe wrote: On Wednesday, 15 February 2012 at 17:48:03 UTC, H. S. Teoh wrote: Yes, I guessed as much. Which brings up a question of what exactly octal deprecation will entail. The goal here is to make sure things either do what they look

Re: More octal questions

2012-02-15 Thread Stewart Gordon
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

Re: More octal questions

2012-02-15 Thread Jonathan M Davis
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

More octal questions

2012-02-14 Thread H. S. Teoh
OK, so I know that octals are deprecated, and the compiler will refuse to compile code with octals unless the -deprecated flag is used. But I find that std.datetime has literals of the form 000, 01, 02, 03, and so on. Are these considered OK? Should my lexer accept them? T -- To err is human;

Re: More octal questions

2012-02-14 Thread Timon Gehr
On 02/14/2012 10:24 PM, H. S. Teoh wrote: OK, so I know that octals are deprecated, and the compiler will refuse to compile code with octals unless the -deprecated flag is used. But I find that std.datetime has literals of the form 000, 01, 02, 03, and so on. Are these considered OK? Should my