Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning object or arrays from within functions, methods
Message
From
29/09/1996 22:04:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Returning object or arrays from within functions, methods
Miscellaneous
Thread ID:
00008798
Message ID:
00008798
Views:
94
Does anyone know how to return an array or an object reference from within a method or function or procedure?

The folowing code is an example of what does not seem to work:

FUNCTION Start
DIMESION aTest(2)
aTest[1] = 1
aTest[2] = 2
*--- CALL TO PROCEDURE TO RETURN ARRAY
aTest2 = RetArray(aTest)

? aTest2[1]
? aTest2[2]
RETURN

FUNCTION RetArray(aRry)
aRry[1] = aRry[1] + 1
aRry[2] = aRry[2] - 2
RETURN aRry



*--- THE CODE ABOVE DOES NOT RETURN AN ARRAY. It returns what looks to be the first element in the array.

Anyone know how to do this?!!!!


.
Next
Reply
Map
View

Click here to load this message in the networking platform