ABS function

Purpose: The ABS function returns the absolute (positive) double precision value of a number.


 Syntax:

 RetVal# = ABS(Number)

 Parameters:

  • Number can be integer, single or double.

 Return Value:

  • RetVal# is the absolute (positive) double precision value of the argument passed in the Number parameter.

Example:


 DIM RetVal#
 
 RetVal# = ABS(-123.45)
 
 PRINT RetVal#

Result:

123.45

BCX Console Sample Programs using ABS function.

S125.bas