Database Management
Reference Manual
Expressions
:
Numeric (Real) Expressions
: ADD and SUBTRACT (+ and -)
ADD and SUBTRACT (+ and -)
The add and subtract functions available are
Synopsis
number + number
-> number
number ‑ number
-> number
+ number
-> number
- number
-> number
Description
Add or subtract two numbers. They can also be used as unary operators at the beginning of a parenthesised sub-expression.
Side Effects
Units are consolidated across add and subtract and the result is returned in current units of the physical quantity, for example when current distance units are inches
q (1ft + 100mm) will return 15.9in
If only one value has a unit qualifier the other is assumed to be in current units of that physical quantity for example:
q (1ft + 100 ) will return 112in
If the two values have conflicting units a warning is issued and a value is returned with no units assuming both values are in the database units of their respective quantities which is mm and Kg in the example:
q (1ft + 1kg ) will return 305.8
Example
1 + 2 -> 3.0
1 ‑ 2 -> 1.0
+ 1 -> 1.0
- 1 -> -1.0
Errors
Floating point underflow.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.