Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an array
Message
 
 
To
11/11/2002 10:28:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00720959
Message ID:
00721025
Views:
11
PRIVATE aUdfArray
DIMENSION aUdfArray[1]

aSomeArray = UDF(para1, para2,...)

UDF()
   LPARAMETERS para1, para2....
   some code for filling an array...
   RETURN aUdfArray
Such arrays must be in scope after the method/UDF call so it's really useful in methods where array could be a property of an object.

>How can I return value without passing array by reference?
>I have VFP 7.0.
>
>
>>In VFP prior version 7 you cannot return array at all. In VFP7 you can but with some limtations. It realy make sense to use in methods only.
>>In any VFP version you can pass array by reference into function and populate it there.
= UDF(@aSomeArray, para1, para2,...)
>>
>>>How can I return an Array?
>>>
>>>For example:
>>>
>>>aSomeArray = UDF(para1, para2,...)
>>>
>>>
>>>
>>>UDF()
>>>   LPARAMETERS para1, para2....
>>>   some code for filling an array...
>>>   RETURN WHAT????
>>>
>>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform