>What is the syntax for returning a value from an array in a function to an array and will it automatically dimension the array it is returning to ?
Arrays are never automatically redimensioned by assigning a value to them.
If you really mean return one element, then the assignment syntax is the same as any other assignment to an array.
LOCAL laArr[1]
laArr[1] = myFunction()
FUNCTION myFunction
LOCAL laArr[1]
laArr[1] = 'Hello'
laArr[2] = 'Goodbye'
RETURN laArr[2]
If, OTOH, you want to return an _array_ (not just an element), the pass the array to the function, like so:
LOCAL laArr[1]
myFunction(@laArr)
FUNCTION myFunction
LPARAMETER taArr
DIMENSION taArr[2]
taArr[1] = 'Hello'
taArr[2] = 'Goodbye'
RETURN