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, Atan2, Cos, Int, Mod, Not, Sgn, Sin, Sqr, Str$, Tan, Val
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
>