Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

VBScript Abs Function

VBScript Abs Function


VBScript reference manual Complete VBScript Reference Manual


The Abs function returns the absolute value of a specified number.

**Note:** If the number parameter contains Null, Null is returned.

**Note:** If the number parameter is an uninitialized variable, 0 is returned.

Syntax

Abs(number)

Parameters Description
number Required. A numeric expression.

Example

Example 1

The example above produces the following output:

1

1

Try it »

Example 2

The example above produces the following output:

48.4

48.4

Try it »


VBScript reference manual Complete VBScript Reference Manual