Initializing static arrays without specifying size
bearophile
bearophileHUGS at lycos.com
Sun Aug 1 16:08:14 PDT 2010
Ziad:
> Is there a way to let the compiler automatically determine the size
> based on the argument list?
I don't know a clean way to do it. See the "related enhancement" here:
http://d.puremagic.com/issues/show_bug.cgi?id=3849
With other people I have proposed the syntax:
int[$] a = [1, 2, 3];
But so far Walter has not shown interest.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list