PML Expressions
- Last UpdatedOct 24, 2022
- 1 minute read
An expression consists of operators and operands.
For example:
2 + 3
This is an expression, where 2 and 3 are the operands, and + is the operator. The result of this expression is 5.
Expressions can (and normally do) contain variables and, in AVEVA E3D, expressions will often contain names of AVEVA E3D element types, attributes and pseudo-attributes.
Expressions can also contain arithmetic and trigonometric functions, such as the SIN trigonometric function.
Often, expressions will contain logical operators:
!height GT !width
Here the logical operator GT is being be used to test if !height is greater than !width.
Each expression has a type such as REAL, STRING or BOOLEAN. All the elements in an expression must be of the correct type. For example:
|
!X + 'text' |
$* wrong, Wrong, WRONG! |
This is meaningless if !X is REAL and will result in an error. (For using the concatenation operator to convert different types to STRING, refer to Concatenation.)