Official Content

Returns the absolute value of the number provided as a parameter.

Syntax

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

Scope

Generators: Java, .NET, .NET Framework, Android

Description

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.

Samples

1)

&NumericExpression1 = -10
&AbsoluteValue = abs(&NumericExpression1) //&AbsoluteValue=10

2) 

&NumericExpression2 = 5
&AbsoluteValue = abs(&NumericExpression2) //&AbsoluteValue=5

Availability

This function is available since GeneXus 18 Upgrade 9.

 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant