Passing arrays by value?

Lionello Lunesu lio at
Mon Feb 5 04:42:23 PST 2007

The spec doesn't specify how fixed-sized arrays are passed to functions 
(or, I did not find it):

void foo( in float[2] array, float x, float y )
     array[0] = x;
     array[1] = y;

It seems to me that an fixed-sized array like that could well be passed 
by value:

void by_ref( in float[] a, ... );
void by_value( in float[2] a, ... );
void by_ref( inout float[2] a, ... );



More information about the Digitalmars-d-learn mailing list