Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : MAX

MAX
Returns the larger of two given values. (F)
Invocation
bigger = MAX(x, y)
 
Usage Notes
The values that you pass to MAX must represent numbers, and can be any syntax.
Example
The following rule finds the highest paid employee by comparing each salary in the EMPLOYEE table.

 
HIGH_SALARY;
_ LOCAL HIGHEST;
_ ---------------------------------------------------------------------
_ ------------------------------------------------------------+--------
_ FORALL EMPLOYEE: | 1
_ HIGHEST = MAX(HIGHEST,EMPLOYEE.SALARY); |
_ END; |
_ RETURN(HIGHEST); | 2
_ ---------------------------------------------------------------------

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved