Unicode symbols in the identifiers

evilrat evilrat666 at gmail.com
Thu Jan 10 19:06:26 PST 2013


On Friday, 11 January 2013 at 02:09:33 UTC, Andrey wrote:
> Should these variants serve as identifiers?
>
> auto x²; //fails to compile: char 0x00b2 not allowed in 
> identifier, unsupported char 0xb2 (why? is it not a digit?)
>
> Same for ⅀, ∫ and etc.
>
> Official documentations says:
> «
> D source text can be in one of the following formats:
> ASCII
> UTF-8
> UTF-16BE
> UTF-16LE
> UTF-32BE
> UTF-32LE
> »
>
> Math symbols could have a great use compare to just characters 
> from other languages (who does code in Greek or Chinese?). 
> Still, this function name in russian cause compile error: 
> 2.вквадрате (вквадрате(2))

save module as utf8(or any other enconding from list above) file, 
from your error description it is ascii


More information about the Digitalmars-d-learn mailing list