Overview of expressions

An expression allows the calculation of a value by using one or more variables, functions, operators and constants. An expression is automatically evaluated each time any of the variables within it change.

Expressions may be defined and used in these ways.

  • They can be entered directly in any animation in the field normally used for a variable name. Expressions used in this way are only evaluated while the window containing the animation is open. An expression is differentiated from a variable name by preceding it with an equal (=) sign.

  • They can be entered in the Expression Editor where they are known as an expression model. Each model is identified by a name that is then used instead of a variable name. This is useful when the same expression is used several times. The animation uses the result of the expression (it does not take a copy of the expression and evaluate it) and hence if the expression is changed this is automatically reflected in any animation in which it is used.