Click or drag to resize

AbsLong 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 AbsLong(
	liValue AS LONG
) AS LONG
Request Example View Source

Parameters

liValue
Type: Long
The 32-bit integer to evaluate.

Return Value

Type: Long
A positive number or 0.
Remarks
AbsLong() is the same as Abs() except that it is strongly typed.
For more information, see Abs().
Examples
These examples show typical results from AbsLong():
X#
1LOCAL liNum1 := 100 AS LONGINT
2LOCAL liNum2 := 150 AS LONGINT
3? liNum1 - liNum2                // -50
4? AbsLong(liNum1 - liNum2)            //  50
5? AbsLong(liNum2 - liNum1)            //  50
6? AbsLong(-12)                    //  12
7? AbsLong(0)                    //  0
See Also