DIAdem Help

Method: Abs for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: Abs for VBS

Calculates the absolute value of a number.

vAbs = Object.Abs(number)
ObjectVBS
Object with this method. You do not need to specify this object.
numberVariant
Specifies any numeric expression.
vAbsVariant
Receives the absolute value.

The following example calculates the absolute value of a number.

Call MsgBox(Abs(47.11))   ' Returns 47.11
Call MsgBox(Abs(-47.11))  ' Returns 47.11

See Also

Objects Overview

Related Topics

Abs | Asc | AscB | AscW | CBool | CByte | CCur | CDate | CDbl | CInt | CLng | CSng | CStr | ChrB | ChrW | Chr | Escape | Fix | Hex | Int | Oct | Sgn | UnEscape