Returns the absolute value of the number provided as a parameter.
abs(Numeric Expression)
Where:
Numeric Expression
Is a Numeric Expression that you must pass to the function as input to obtain the absolute value of that number.
Type Returned:
Numeric
Generators: Java, .NET, .NET Framework, Android
This function returns the absolute value of a number.
For example, Abs(-5) returns 5.
Note: This function is supported in all DBMS and can be solved with SQL.
1)
&NumericExpression1 = -10
&AbsoluteValue = abs(&NumericExpression1) //&AbsoluteValue=10
2)
&NumericExpression2 = 5
&AbsoluteValue = abs(&NumericExpression2) //&AbsoluteValue=5
This function is available since GeneXus 18 Upgrade 9.