Store variables as expressions
By default, Tedds for Word stores all variables as values. However, it may sometimes be useful to store variables as expressions instead. This is particularly useful when the value of a term in an expression changes during calculations. To store variables as expressions, see the following instructions.
The following only applies to Tedds for Word.
Example
To understand the difference between storing variables as values and expressions, consider the following calculation:
r = 10 mm
A = pi * r 2 = ? mm 2
The calculation is calculated to give:
r = 10 mm A = pi * r 2 = 314.2 mm 2
When calculated, the variable A above can be stored in two different ways:
-
As the value resulting from the calculation:
A = 314.2 mm 2
-
As the expression that is used to define the variable:
A = pi * r 2
If you store A as an expression value, each time you reference A in later calculations, the value returned is re-calculated.
Therefore, if the value of r changes, the result of A changes as well.