Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return values
Message
De
06/03/2001 11:30:09
 
 
À
06/03/2001 11:07:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00482246
Message ID:
00482257
Vues:
10
>Is it possible to return multiple values from a procedure. To get 1 value I do:
>
>myvalue = myprocedure(myparams)
>
>Is there a way to get more that 1 return value? If so, how?

Not directly, however you can use parameters passed by reference using the @ "switch":
x = 10
y = 15

x = MyUDF(x, @y)
? x    && x = 40
? y    && y = 30


FUNCTION MyUDF
LPARAMETERS nFirst, nSecond
  nSecond = nSecond * 2
RETURN nFirst + nSecond
HTH!
Sylvain Demers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform