Thread overview
HexadecimalH
Feb 22, 2003
Alix Pexton
Feb 22, 2003
Burton Radons
Feb 22, 2003
Walter
Feb 23, 2003
Alix Pexton
February 22, 2003
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

February 22, 2003
Alix Pexton wrote:
> In the D specs ("lex.html" to be precise) there is a production thus:
> 
>     HexadecimalH:
>         HexDigits h
>         HexDigits H
>     

This should be:

    HexadecimalH:
        DecDigit h
        DecDigit H
        DecDigit HexDigits h
        DecDigit 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;
> }

Err, it reports the correct error here on the same version.

February 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


February 23, 2003
Walter wrote:
> "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
> 
> 
Thought not...

On-line syntax highlighting for "The D journal" just got easier...

Alix...

-- 
            Alix Pexton
Webmaster - http://www.theDjournal.com

            Alix@theDjournal.com