Filling an array

user42 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 12 08:37:25 PST 2016


On Saturday, 12 March 2016 at 14:33:19 UTC, Alex wrote:
> /snip

I thought this was supposed to halt with an error rather than 
compile and set all members to 1.
The syntax, to me anyways, doesn't really communicate the 
intention of: set all members to 1.
>     //arr[] = 1;

Whereas the following does
>     fill(arr, 1);



More information about the Digitalmars-d-learn mailing list