AbsReal4 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 AbsReal4(
r4Value AS REAL4
) AS REAL4
public static float AbsReal4(
float r4Value
)
Request Example
View SourceParameters
- r4Value
- Type: Single
The 32-bit floating point number to evaluate.
Return Value
Type:
Single
A positive number or 0.
Remarks
AbsReal4() is the same as Abs() except that it is strongly typed.
For more information, see Abs().
Examples
These examples show typical results from AbsReal4():
1LOCAL r4Num1 := 99.99 AS REAL4
2LOCAL r4Num2 := 149.99 AS REAL4
3? r4Num1 - r4Num2
4? AbsReal4(r4Num1 - r4Num2)
5? AbsReal4(r4Num2 - r4Num1)
6? AbsReal4(-12)
7? AbsReal4(0)
See Also