ABS()
Action

Returns the absolute value of a numeric variable.

Syntax

var = ABS(var2)

Remarks

var Variable that is assigned the absolute value of var2.
Var2 The source variable to retrieve the absolute value from.
var : Byte, Integer, Word, Long.
var2 : Integer, Long.

The absolute value of a number is always positive.

See also
-

Difference with QB
You can not use numeric constants since the absolute value is obvious for numeric constants.
Does also not works with Singles.

Example


Dim a as Integer, c as Integer
a = -1000
c = Abs(a)
Print c
End

Output

1000