It is possible using a function to return a array ?

 

Hello,


I use a function in order to modify values in a array and i want ot return the modified array.


Example :


double userFunction(int A, double BufferValue[Size], double B)

{

double ModifiedBufferValue[Size];

//----

... modify array value...

//----

return(ModifiedBufferValue);

}


Is it possible ?


Note:

It's seems to me that structure can't be use. Can you confirm ?


Thanks for responses...

 
int modify(int &par[])
   {
   par[1]=5;
   par[2]=6;
   par[3]=7;   
   return 0;
   }

int start()
  {
   int a[5];
   Print ("BEFORE a[1]=",a[1]);   
   modify(a);   
   Print ("AFTER a[1]=",a[1]);      
   return(0);
  }
 
fx1.net:

Thanks for the answers !


The "&" caracter is like a pointer property.


I will use it now !

Reason: