Error: functions cannot return static array float[4u][4u]
Spacen Jasset
spacen at yahoo.co.uk
Thu Feb 21 16:25:44 PST 2008
Derek Parnell wrote:
> On Thu, 21 Feb 2008 23:00:51 +0000, Spacen Jasset wrote:
>
>> For this member function:
>>
>> float[4][4] toFloatArray4x4()
>> {
>> float f[4][4];
>> return f;
>> }
>>
>> I get:
>> Error: functions cannot return static array float[4u][4u]
>
> On a related note, why can't D handle 'ref' and 'out' static arrays either?
> In other words, this below won't compile...
>
> void toFloatArray4x4(ref float[4][4] p) ...
>
> So what is the rationale for that?
>
See my post above yours. arrays have pass by reference semantics unlike
stucts, ints and other basic types.
More information about the Digitalmars-d-learn
mailing list