Initialization of dynamic multidimensional array
berni via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Feb 10 01:36:49 PST 2017
On Friday, 10 February 2017 at 09:34:39 UTC, berni wrote:
> On Friday, 10 February 2017 at 09:25:04 UTC, Daniel Kozak wrote:
>>> Now I tried this with a named instead of a magic constant e.g.
>>>
>>>> immutable VALUE=-1;
>>>> arr.each!"a[]=VALUE";
>>>
>>> And it doesn't work anymore. I've no clue, why... Can you
>>> help me?
>> Because it does not see VALUE, you need to use delegate insted
>> of string something like this:
>>
>> arr.each!(a=>a[]=VALUE);
>
> Unfortunately this leeds to the same error... (Or something
> very simmilar.)
Opps, sorry. Taking back everything. It was a typo, that caused
the error.
More information about the Digitalmars-d-learn
mailing list