[OT] Accents in symbols [Was] Re: GNU Scientific Library in D

Chris Nicholson-Sauls ibisbasenji at gmail.com
Mon Aug 6 13:23:32 PDT 2007


Deewiant wrote:
> Chris Nicholson-Sauls wrote:
>> return this.scaoil ? Staid.Rath : Staid.Loiceadh ;
>>
>> Alas the lament of the poor maintenance coder.  Its a shame I can't put
>> accents in a symbol.
>>
> 
> Sure you can!
> 
> class Äöå {
> 	int fõó() { return Bàr.Ë; }
> }
> 
> enum Bàr {
> 	Ë = 2
> }
> 
> void main() {
> 	auto x = new Äöå();
> 	assert (x.fõó == 2);
> }
> 
> Just save it in a UTF format.
> 

Huh, I remember there being some problems with doing so... then again, 
that was actually a few years ago now.  Nifty.  :)  I'm off to make some 
people even more mad at me than they already are.

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list