Skip to main content
Version: 7.0

MAX operator

The MAX operator creates a property that implements finding the maximum value.

Syntax​

MAX expr1, ..., exprN

Description​

The MAX operator creates a property whose value is the maximum among the values of the specified operands. The skipping of NULL operands and the determination of the result class follow the extremum. An operator written after the last operand belongs to that operand, not to the result: a comparison of the maximum is written (MAX a, b) > c.

Parameters​

  • expr1, ..., exprN

    Expressions whose values the maximum is selected among. At least one operand must be specified.

Examples​

date1 = DATA DATE(INTEGER);
date2 = DATA DATE(INTEGER);
maxDate (INTEGER i) = MAX date1(i), date2(i);

balance = DATA INTEGER (Item);
outcome 'Balance (non-negative)' (Item i) = MAX balance(i), 0;