>To All:
>IS there a way in VFP to return multiple values from a User Defined Function? I don't want to use an Array, then I have to pass by reference and I am trying to avoid that. I have thought about casting and concatenating the values to a single string then returning that and parsing it when needed but I know there has to be a 'cleaner' way to accomplish this.
>
Hi Woodie
There is many ways.. basically here is two..
Procedure main
SET UDFPARMS TO VALUE
a="1"
b="2"
c="3"
d=udf_setvalue(@a, @b, @c)
? a,b,c
function udf_setvalue
parameters a, b, c
a="3"
b="4"
c="5"
return .t.
set udfparms to reference
a="1"
b="2"
c="3"
d=udf_setvalue(a, b, c)
? a,b,c
function udf_setvalue
parameters a, b, c
a="3"
b="4"
c="5"
return .t.
HTH
Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20