One case of array assignments

bearophile bearophileHUGS at lycos.com
Tue Mar 12 19:45:20 PDT 2013


Marco Leise:

> But that's probably only because you didn't say:
>
>   int[100][3] a2 = [1, 2, 3];
>
> :D

I don't understand.


> We should keep _some_ syntax for statically initializing an 
> array
> from a single element. It's a far too common task.

I agree.

What I have suggested asks to write code like [[1], [2], [3]] 
instead of [1, 2, 3].

Bye,
bearophile


More information about the Digitalmars-d mailing list