An array is always passed by reference so instead of returning an
array your method should take an array (of int based on your example)
as a parameter and then inside your method you can add new elements to
that array.
Hope this helps.
--
Marco Bambini
Server Architect
REAL Software, Inc.
On Jan 14, 2009, at 4:07 PM, Massimo Valle wrote:
Is there a way, (and if so, how) to return an array from a method?
I need to return an array of object and tried to use the
REALobjectArray struct without success.
I also tried with a simpler situation returning an array of int with
REALintArray but with the same result.
May be I messed up with pointers too...
static REALintArray getMyArray(void) {
int theArray[] = {0,1,2,3,4,5,6,7,8,9};
return (REALintArray)*theArray;
}
Thanks for help,
Massimo Valle
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>