Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ICASE() alternative
Message
From
22/01/2019 13:44:16
 
 
To
22/01/2019 10:19:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01665620
Message ID:
01665636
Views:
77
Likes (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
Previous
Reply
Map
View

Click here to load this message in the networking platform