Keystroke: ~ (tilde)
≡
Returns a globally defined variable. Regardless of placement in the worksheet,
global definitions supercede other worksheet evaluations
or definitions.
Global definitions work exactly like local definitions except that they are evaluated before any local definitions. If you define a variable or function with a global definition, that variable or function is available to all local definitions in your worksheet, regardless of whether the local definition appears above or below the global definition.
Operands:
- On the right, any valid Mathcad variable name.
- Any valid Mathcad expression.
Notes:
- You can change the appearance
of this operator.
- If a variable is defined using the local definition operator above a global assignment, the global assignment ignores it, although multiple
global definitions are themselves evaluated in top-down, left-to-right
order. Be careful when interleaving global and local definitions, as results
may not be what you expect.
- Mathcad uses this algorithm to evaluate all definitions:
First, Mathcad takes one pass through the entire worksheet from top to bottom to evaluate global definitions only.
Mathcad then makes a second pass through the worksheet from top to bottom to evaluate all definitions made with ":=" as well as all equations containing = and ≡. Note that during this pass, global definitions do not use any local definitions.
- Although global definitions are evaluated before any local definitions, Mathcad evaluates global definitions the same way it evaluates local definitions: top to bottom and left to right. This means that whenever you use a variable to the right of a ≡,
that variable must also have been defined with a ≡, and
the variable must have been defined above the place where you are trying to use it.
Otherwise, the variable is marked in red to indicate that it is undefined.