October 09, 2004 hexadecimal integer literal "[0-9a-fA-F]+h" doesn't behave as documented | ||||
---|---|---|---|---|
| ||||
lex.html: > Hexadecimal integers are a sequence of hexadecimal > digits preceded by a '0x' or followed by an 'h'. code: # # int i = 123h; # results in: run/integer_literal_hex_13.d(2): found 'h' when expecting ')' run/integer_literal_hex_13.d(2): found ')' when expecting ';' following 'statement' test case: svn://svn.kuehne.cn/dstress/run/integer_literal_hex_13.d Thomas |
October 09, 2004 Re: hexadecimal integer literal "[0-9a-fA-F]+h" doesn't behave as documented | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote:
> lex.html:
>
>>Hexadecimal integers are a sequence of hexadecimal
>>digits preceded by a '0x' or followed by an 'h'.
>
>
> code:
> #
> # int i = 123h;
> #
>
> results in:
> run/integer_literal_hex_13.d(2): found 'h' when expecting ')'
> run/integer_literal_hex_13.d(2): found ')' when expecting ';' following
> 'statement'
>
> test case:
> svn://svn.kuehne.cn/dstress/run/integer_literal_hex_13.d
That's a typo in the standard. D originally had suffix hex; it hasn't been part of the language for about two years now.
|
Copyright © 1999-2021 by the D Language Foundation