D - HexadecimalH
- Alix Pexton (32/32) Feb 22 2003 In the D specs ("lex.html" to be precise) there is a production thus:
- Burton Radons (8/21) Feb 22 2003 This should be:
- Walter (3/5) Feb 22 2003 No, it should be removed from the doc. -Walter
- Alix Pexton (8/18) Feb 23 2003 Thought not...
In the D specs ("lex.html" to be precise) there is a production thus: HexadecimalH: HexDigits h HexDigits H however the following code which should compile and run (printing "3756") infact crashes the compiler (0.56): int main(char[][] args){ printf("%d\n", each); return 0; } If 'each' is first defined as an int and given a value, thus: int main(char[][] args){ int each = 1; printf("%d\n", each); return 0; } then the code compiles and when run the program prints "1". Meanwhile, an identifier that does not match the HexadecimalH production, thus: int main(char[][] args){ printf("%d\n", eachone); return 0; } is correctly reported as being undefined. HexadecimalH (in this case at least) seems to be broken. Do we really need it??? Alix... -- Alix Pexton Webmaster - http://www.theDjournal.com Alix theDjournal.com
Feb 22 2003
Alix Pexton wrote:In the D specs ("lex.html" to be precise) there is a production thus: HexadecimalH: HexDigits h HexDigits HThis should be: HexadecimalH: DecDigit h DecDigit H DecDigit HexDigits h DecDigit HexDigits Hhowever the following code which should compile and run (printing "3756") infact crashes the compiler (0.56): int main(char[][] args){ printf("%d\n", each); return 0; }Err, it reports the correct error here on the same version.
Feb 22 2003
"Alix Pexton" <Alix thedjournal.com> wrote in message news:b3899j$1efj$1 digitaldaemon.com...HexadecimalH (in this case at least) seems to be broken. Do we really need it???No, it should be removed from the doc. -Walter
Feb 22 2003
Walter wrote:"Alix Pexton" <Alix thedjournal.com> wrote in message news:b3899j$1efj$1 digitaldaemon.com...Thought not... On-line syntax highlighting for "The D journal" just got easier... Alix... -- Alix Pexton Webmaster - http://www.theDjournal.com Alix theDjournal.comHexadecimalH (in this case at least) seems to be broken. Do we really need it???No, it should be removed from the doc. -Walter
Feb 23 2003