Abs Function
Returns the absolute value of a number.
Syntax
Abs(number)
Parameters
- number
- Define an expression or specify a value directly.
Return Values
The absolute value of a number.
Description
The absolute value of a number is its unsigned magnitude. For example, Abs(-1) and Abs(1) both return 1.
See Also
Atan Function, Atan2 Function, Cos Function, Int Function, Mod Operator, Not Operator, Sgn Function, Sin Function, Sqr Function, Str$ Function, Tan Function, Val Function
Abs Function Example
The following examples are done from the command window using the Print instruction.
> print abs(1)
1
> print abs(-1)
1
> print abs(-3.54)
3.54
>