Min Function | |
Return the smaller of 2 values.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION Min(
uValue1 AS USUAL,
uValue2 AS USUAL
) AS USUAL
public static Usual Min(
Usual uValue1,
Usual uValue2
)
Request Example
View SourceParameters
- uValue1
- Type: Usual
The first value to compare. - uValue2
- Type: Usual
The second value to compare.
This must be of the same type as uValue1 except that numerics of different types are allowed.
Return Value
Type:
Usual
The smaller of the 2 arguments.
The value returned is the same type as the smaller argument.
Remarks
The inverse of Min() is Max(), which returns the larger of 2 expressions.
Examples
In these examples Min() returns the smaller of 2 numbers:
1? MIN(99, 100)
2? MIN(100, 99)
In these examples Min() compares date values:
1? TODAY()
2? MIN(TODAY(), TODAY() + 30)
See Also