Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I get an array ?
Message
From
26/02/1999 02:59:04
 
 
To
26/02/1999 02:47:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00191828
Message ID:
00191831
Views:
21
>How can I get an array as function return value?

You simply can't.
If you want to do something like that you have to pass the array to the function by reference, manipulate it in your function and when you get back, you have your 'returned' array.

ex.

local laSomething[10]

*-- laSomething[5] equals .f.


MyFunction(@laSomething)

*-- returned from function call,
*-- now you can see that
*-- laSomething[5] equals 'kweeniewa'
? laSomething[5]

*-------------------------
function MyFunction
*-------------------------
LPARAMETERS taArray

taArray[5] = 'kweeniewa'

ENDFUNC


****************
Or you can return an object reference with user defined props.
Which is a bit closer to what you have in mind I think.
Previous
Reply
Map
View

Click here to load this message in the networking platform