General information
Title:
Returning object or arrays from within functions, methods
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only