Static Constructors

Saaa empty at needmail.com
Sat Oct 4 14:37:30 PDT 2008


> for example:
>
> int[] data = [0,1,2,3,4].dup;
why the dup?

>
> int[] dataslice = data[0..2];
> dataslice.length = 1;
>
> assert(data[1] == 1); // this would fail
>
> -Steve

Rest makes sense. 




More information about the Digitalmars-d-learn mailing list