George: return array in function
Posted: 08 Jun 2007, 14:03
is it possible to retun an array from a function if I code this:
I get this "myArray.0" WHERE I would expect "carl"
but if I dont declare the "array" variable local I can get what I want like this:
Is this correct?
-mads[/code]
Code: Select all
param none
myArray = returnArray()
tv_warn myArray[0]
Function returnArray()
LOCAL array
array[0] = "carl"
array[1] = "barks"
RETURN array
End
but if I dont declare the "array" variable local I can get what I want like this:
Code: Select all
param none
returnArray()
tv_warn array[0]
Function returnArray()
array[0] = "carl"
array[1] = "barks"
End
-mads[/code]