back to arays
    Max Samuha 
    maxter at i.com.ua_spamless
       
    Mon May 15 14:01:31 PDT 2006
    
    
  
On Mon, 15 May 2006 23:08:26 +1000, "Derek Parnell" <derek at psych.ward>
wrote:
>void main()
>{
>    int[] a;
>    int[]* b;
>    int[]* c;
>
>    b = &a;
>    c = &a;
>    a.length= 40;
>    a[0] = 17;
>    writefln("%d %d", c.length, b.length);
>    writefln("%d %d", *c[0], *b[0]);
>}
>
>-------------------------
>This displays
>40 40
>17 17
>-------------------------
>
>But I still don't know why one would want to do this?
No, i certainly don't want to do this. I just expected from D's
dynamic arrays what was described here in a more readable English as
arrays being reference types. That's clearer now. Thanks
    
    
More information about the Digitalmars-d-learn
mailing list