Initialize static array without explicit length

Andrey saasecondbox at yandex.ru
Mon Dec 3 09:51:45 UTC 2018


Hi,
I want to create a static array and immediately init it with 
values:
> uint[xxxxx] data = [1,3,10,44,0,5000];

I don't want to set the length of it explicitly (xxxxx in square 
brackets). I want that compiler itself counted number of values 
(in example it is 6).

What should be a right syntax?


More information about the Digitalmars-d-learn mailing list