Abs function (LotusScript® Language)

Returns the absolute value of a numeric expression.

Syntax

Abs ( numExpr )

Elements

numExpr

Any numeric expression.

Return value

Abs returns the absolute value of numExpr.

The data type of the return value is the same as the data type of numExpr, unless numExpr is a Variant. In that case, the following rules apply:

  • If numExpr contains a string that LotusScript® can convert to a number, the data type is Double.
  • If numExpr contains a value that LotusScript® cannot convert to a number, the function raises a type-mismatch error.
  • If numExpr contains a NULL, the return value is NULL.

Usage

The absolute value of a number is its unsigned magnitude; for example, 3 and -3 both have an absolute value of 3.

Example