New in version 6.4.0: See the new features.

Returning the absolute valueΒΆ

abs()

Return the absolute value


SYNTAX

abs(number_expression)

Returns the absolute value of the numeric_expression using the same datatype as the received numeric_expression.

Note

When number_expression is a string, it is converted into a floating point value and returned as such.


EXAMPLE

if (abs(value1 - value2) > 10) {
  info "Difference greater than 10"
}