Absolute Value '| |'
The Absolute Value operator, also called Absolute, returns the absolute value (the positive form) of a number. Absolute Value can be used in both variable and constant expressions. When used with variable expressions or integer constant expressions, Absolute Value returns the 32-bit integer result. When used with floating-point constant expressions, Absolute Value returns the 32-bit single-precision floating-point result. Example:
X := ||Y
If Y is -15, the absolute value, 15, would be stored into X.
Absolute Value becomes an assignment operator when it is the sole operator to the left of a variable on a line by itself. For example:
||Y
This would store the absolute value of Y back into Y.
Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.