bdog, I'm pretty sure MSWIN will handle nested ifs, but I've always found them non-intuitive, because if() is used for conditional assignment, not flow control. Also, it's easy to go crazy over matching parentheses.
What I do is identify Condition 1, 2, 3, 4 as a non-overlapping partition of all outcomes. Then use:
Result:= if(Condition1, expression1, 0)+ if(Condition2, expression2, 0)+ if(Condition3, expression3, 0)+ if(Condition4, expression4, 0);
Paul
This approach works well in system testing. Use opt1 as an "index" to select from several exit conditions. This lets you compare different exit strategy variants for a system with one entry rule (or vice versa). |