LOCAL test1, test2 * Change these values to see how it works with each test1 = .f. test2 = .f. = (m.test1 and match1(@lnVar1, @lnVar2)) OR ; (m. test2 and match2(@lnVar1, @lnVar2)) OR ; nomatch(@lnVar1, @lnVar2)) ? m.lnVar1, m.lnVar2>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