Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ICASE() alternative
Message
 
 
À
22/01/2019 10:19:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01665620
Message ID:
01665636
Vues:
78
J'aime (1)
Perhaps _vfp.SetVar() can be of use?

>Does anyone know another way to do this? I want to set multiple values (two in this case) in an ICASE() based on the one matched condition.
>
>
LOCAL lnVar1, lnVar2
>LOCAL test1, test2
>
>* Change these values to see how it works with each
>test1 = .f.
>test2 = .f.
>
>ICASE(test1, match1(@lnVar1, @lnVar2), ;
>      test2, match2(@lnVar1, @lnVar2), ;
>      nomatch(@lnVar1, @lnVar2))
>
>? lnVar1, lnVar2
>
>
>
>FUNCTION match1
>LPARAMETERS tnVar1, tnVar2
>    tnVar1 = 1
>    tnVar2 = 2
>ENDFUNC
>
>
>
>FUNCTION match2
>LPARAMETERS tnVar1, tnVar2
>    tnVar1 = 10
>    tnVar2 = 20
>ENDFUNC
>
>
>
>FUNCTION nomatch
>LPARAMETERS tnVar1, tnVar2
>    tnVar1 = -1
>    tnVar2 = -2
>ENDFUNC
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform