The ABS function returns the absolute, positive, double precision, floating point, value of a number.
Syntax:RetVal = ABS(Number) Return Value:
Parameters:
|
While the ABS function can be used within calculations, it is better to use temporary holders for the value of absolute function that use floating point values since on very rare occasions it needs to be normalized on return. The storing of an unnormalized floating point variable forces normalization.
DIM RetVal AS DOUBLE RetVal = ABS(-123.45) PRINT RetVal
123.45
The IABS function returns the absolute, positive, integer precision, value of a number.
Syntax:RetVal = IABS(Number) Return Value:
Parameters:
|
While the IABS function can be used within calculations, it is better to use temporary holders for the value of absolute function that use floating point values since on very rare occasions it needs to be normalized on return. The storing of an unnormalized floating point variable forces normalization.
DIM RetVal AS INTEGER RetVal = IABS(-123.45) PRINT RetVal
123