This is for Mathcad 15 although I would like to apply later to Prime 8.0. My goals are for all of the boolean variables to be active for all portions of the sheet. I want to defeat the top-down, left-right programming in the sheet. See attached.
I want to defeat the top-down, left-right programming in the sheet.
Why??
What would/should be the benefit of the global assignment?
A global assignment can only use constants or other globally assigned variables or functions. A global assignment CAN NOT USE variables which are defined using the normal assignment operator := even if the variable is defined in front of it. Thats the reason for the error your got.
Terry tried to explain the reason for this behaviour. The sheet is first read by Prime from top down only looking for global assignments. Normal assignments are ignored in this first pass (hence the error). Then in the second pass the normal assignments are considered and stored. That way its possible that a variable which is globally assigned can be used even in front of its actual definition.
To make your approach with the global assignment work you would have to also globally assign the variables Z1P, etc. which are used in the definition of TR. Not sure what the benefit of doing so would be, though.
I believe that I want to define various variables implicitly as they will be assigned further down in the sheet. But I don't know how to do that in Mathcad.
I believe that I want to define various variables implicitly as they will be assigned further down in the sheet. But I don't know how to do that in Mathcad.
Not sure what exactly an "implicit" variable definition would be. Would it make sense to define those variables globally so you can use them on top of the sheet before you define them? Maybe a better approach is to define functions. and use them later when the variables are defined. Depends on what exactly you really try to achieve.