.init property for char[] type
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Sep 22 14:36:29 PDT 2009
Justin Johansson wrote:
> Jeremie Pelletier Wrote:
>> Besides, if you initialize character
>> arrays to "", what do you initialize other arrays to, and other
>> reference types to? It just wouldn't be consistent.
>
> Consistency. Since when is that an argument?
>
> Just to be a PITA, pick the inconsistent row in the table below (from spec_D1.00.pdf).
> The row ordering of the the table has been shuffled just to make it a bit more difficult to spot :-)
>
> short.init 0
> int.init 0
> bool.init false
> byte.init 0
> double.init double.nan
> long.init 0L
>
You forgot
char.init 0xFF
wchar.init 0xFFFF
dchar.init 0xFFFFFFFF
Andrei
More information about the Digitalmars-d
mailing list