Function Reference


_Max

Evaluates which of the two numbers is higher

#include <Math.au3>
_Max ( $iNum1, $iNum2 )

Parameters

$iNum1 First number.
$iNum2 Second number.

Return Value

Success: the higher of the two numbers.
Failure: 0 and sets the @error flag to non-zero
@error: 1 - $iNum1 isn't a number.
2 - $iNum2 isn't a number.

Remarks

This function works with floats as well as integers.

Related

_Min

Example

#include <Math.au3>
#include <MsgBoxConstants.au3>

Local $iMax = _Max(1, 10) ; Returns 10.
MsgBox($MB_SYSTEMMODAL, '', 'Maximum value: ' & $iMax)