|
|||||
Related Concepts | ||
operator |
abs
|
Return type: OMX The absolute value of a specified number.
Returns:
Syntax
abs bcd expression OR abs floating point expression
Use abs
to get the absolute value of a floating point number or BCD number.
To get the absolute value of a BCD number, you must import the ombcd.xmd file in your program. To get the absolute value of a floating point number, import the omfloat.xmd file.
BCD Example:
The following program will output "$34.98":
import "ombcd.xmd" unprefixed process local bcd price set price to -34.98 output "<$,NNZ.ZZ>" % abs price
Related Concepts BCD data type |