Max Function | |
Return the larger of 2 values.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION Max(
uValue1 AS USUAL,
uValue2 AS USUAL
) AS USUAL
public static Usual Max(
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 larger of the 2 arguments.
The value returned is the same type as the larger argument.
Remarks
The inverse of Max() is Min(), which returns the smaller of 2 expressions.
Examples
In these examples Max() returns the larger of 2 numbers:
1? MAX(99, 100)
2? MAX(100, 99)
In these examples Max() compares date values:
1? TODAY()
2? MAX(TODAY(), TODAY() + 1)
See Also