Click or drag to resize

AbsReal8 Function

Return the absolute value of a strongly typed numeric expression, regardless of its sign.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax
 FUNCTION AbsReal8(
	r8Value AS REAL8
) AS REAL8
View Source

Parameters

r8Value
Type: Double
The 64-bit floating point number to evaluate.

Return Value

Type: Double
A positive number or 0.
Remarks
AbsReal8() is the same as Abs() except that it is strongly typed.  For more information, see Abs().
Examples
These examples show typical results from AbsReal8():
X#
LOCAL r8Num1 := 99.99 AS REAL8
LOCAL r8Num2 := 149.99 AS REAL8
? r8Num1 - r8Num2                                // -50.00
? AbsReal8(r8Num1 - r8Num2)                        //  50.00
? AbsReal8(r8Num2 - r8Num1)                        //  50
? AbsReal8(-12)                                        //  12
? AbsReal8(0)                                        //  0
See Also