AbsShort 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.19
Syntax FUNCTION AbsShort(
siValue AS SHORT
) AS LONG
public static int AbsShort(
short siValue
)
Request Example
View SourceParameters
- siValue
- Type: Short
The 16-bit integer to evaluate.
Return Value
Type:
Long
A positive number or 0.
Remarks
AbsShort() is the same as Abs() except that it is strongly typed.
For more information, see Abs().
Examples
These examples show typical results from AbsShort():
1LOCAL siNum1 := 100 AS SHORTINT
2LOCAL siNum2 := 150 AS SHORTINT
3? siNum1 - siNum2
4? AbsShort(siNum1 - siNum2)
5? AbsShort(siNum2 - siNum1)
6? AbsShort(-12)
7? AbsShort(0)
See Also