Click or drag to resize

AbsInt 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 AbsInt(
	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
AbsInt() is the same as Abs() except that it is strongly typed.
For more information, see Abs().
Examples
These examples show typical results from AbsInt():
X#
1LOCAL iNum1 := 100 AS INT
2LOCAL iNum2 := 150 AS INT
3? iNum1 - iNum2                // -50
4? AbsInt(iNum1 - iNum2)        //  50
5? AbsInt(iNum2 - iNum1)        //  50
6? AbsInt(-12)                //  12
7? AbsInt(0)                //  0
See Also