Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return Multiple Values From a UDF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00979276
Message ID:
00979287
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform