>>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.
>
>Why I don't see why (you ask this), but obviously:
>
>
>update:
>Ah, I missed the point you like to have it as an ICASE
>
>ICASE(.T.,TestMatch(test1,test2,@lnVar1, @lnVar2))
>
>
>Rick, I do not understand what you are trying to do. It returns .T. and altere teh paras, one way is more or less like the next.
>Except
>Speed
>code clearence
>and:
>FUNCTIONS should not do this. A FUNCTION should return a value based on the parameters. No side effects, no parameter by reference.
>
>I've done odd things with functions (in VFP SQL, to get special effects), but at least a return value ....
In C and C++, for example, you could do the equivalent of this to do multiple assignments:
ICASE(test1, (lnVar1 = 1, lnVar2 = 2), test2, (lnVar1 = 10, lnVar2 = 20), (lnVar1 = -1, lnVar2 = -2))
I was just wondering if anyone knew of an ability to do something similar in VFP that didn't require functions and @references?