On 4/21/2010 10:03:21 PM, Tom_Gutman wrote:
>Nowhere near as simple as ...
Very clear explanation.
As an addendum, reading a range variable as an equivalent 'for' loop, the hidden 'next' statement it's at the end of the worksheet, or just before a redefinition of the range variable. That's at the worksheet level, in the usual way.
An equivalent range construction inside a program, probably can put the hidden next's at the end of the program, and then work just like and for case is writing, following the for rules, and not the global range variable rules.
What I don't know if it is possible to write in that case unlogical expression. Like, for example, the very bad situation: two range variable definitions, one in the 'if' case, and other in the 'otherwise' case. Which 'next' go first? Remember that mathcad have not "delayed" assignations. Can compile well this situation?
For unexpected results, just see this example (mathcad 11 only):
Regards. Alvaro.