ABS(number)

Returns the absolute value of a number (Variant).


number

The number you want the absolute of (Variant).


Remarks
The data type of the value returned is the same as the the data type of the number passed in.
The absolute value of a number is the number without its sign.
The "number" can be any valid numeric expression.
If "number" is Null, then Null is returned.
If "number" is an uninitialised variable, then 0 is returned.
The equivalent Excel worksheet function is Excel > Functions > ABS.
The equivalent .NET function is System.Math.Abs

Abs(1) = 1 
Abs(-1) = 1
Abs(-2.4) = 2.4
Abs(Null) = Null
TypeName(Abs("integer")) = "Integer"
TypeName(Abs("single")) = "Single"
TypeName(Abs("doubler")) = "Double"
TypeName(Abs("string")) = "Double"
TypeName(Abs("boolean")) = "Integer"

© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited