Hi Woody.
>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.
Pass an object. The UDF can then set whatever properties it wants and the caller can then examine the values of these properties. You can even create the object on the fly:
loParameters = createobject('Empty')
addproperty(loParameters, 'ReturnValue1', '')
addproperty(loParameters, 'ReturnValue2', 0)
do MyUDF with loParameters
? loParameters.ReturnValue1
? loParameters.ReturnValue2
function MyUDF(toParameters)
toParameters.ReturnValue1 = 'Howdy'
toParameters.ReturnValue2 = 5
return
Doug