Click or drag to resize

AbsReal8 Function

X#
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.19
Syntax
 FUNCTION AbsReal8(
	r8Value AS REAL8
) AS REAL8
Request Example 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#
1LOCAL r8Num1 := 99.99 AS REAL8
2LOCAL r8Num2 := 149.99 AS REAL8
3? r8Num1 - r8Num2                // -50.00
4? AbsReal8(r8Num1 - r8Num2)            //  50.00
5? AbsReal8(r8Num2 - r8Num1)            //  50
6? AbsReal8(-12)                    //  12
7? AbsReal8(0)                    //  0
See Also