>Hi to all,
>
>Is it possible to return many values from a function or a procedure. I tried to return an array which would contain all the values I need but it didn't work, I only got the last value.
>
>The code I tried was something like this:
>
>FUNCTION calculate(list of parameters)
> bla bla bla
> dimension taReturn(3)
> taReturn[1] = lnvalue1
> taReturn[2] = lnvalue2
> taReturn[3] = lnvalue3
>
> return taReturn
>
>ENDFUNC
>
>and in my form I did something like this:
>
>declare taAnswer(3)
>
>taAnswer = calculate(list of parameters)
>
>wait windows str(taAnswer[1])
>wait windows str(taAnswer[2])
>wait windows str(taAnswer[3])
>
>All 3 wait windows gave me the same value which is lnvalue3 from the function.
>
>
>TIA
Diane,
Probably you didn't pass by reference. There are other workarounds. Create custom form property such as aRetArray[1], pass also form's object ref to function so it fills directly your custom array.
Cetin