Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an Array from a Function
Message
From
28/02/2000 23:20:43
Michel Lalonde
Laboratoire Médical Biron
Lachine, Quebec, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00338850
Message ID:
00338907
Views:
17
>Then, how i Return an Array from a function?


Call a function with extra ARRAY parameter. This function return the number of element in your extra ARRAY parameter


Example:

*- Declare
procedure xyz (InArray, ResultArray)

...

IF lnResultCount > 0
DEClARE ResultArray[lnResultCount]
ENDIF

Return lnResultCount


*- Call

LOCAL laVal[3], laRes[1]
lnCount = XYZ (@laVal, @laRes)
FOR I = 1 TO lnCount
? laRes[lnCount]
NEXT
Previous
Reply
Map
View

Click here to load this message in the networking platform