maxl
OPL function to return the maximal value
Purpose
OPL function to return the maximal value from a list of integers or floats.
| type |
|---|
int or float |
Syntax
int maxl(int,...) float maxl(float,...)
Description
Returns the maximal value from a list of integer or float values. You can use this function within IBM ILOG Script statements by specifying the OPL namespace:
( Opl.xxx() )
Example
int maxofs1=maxl(1, 2 ,5 ,10, 7 ,8);
float maxofs2=maxl(2.5 ,1.522e2, -10.2);
execute
{
writeln("maxl(1, 2 ,5 ,10, 7 ,8) gives ",maxofs1);
writeln("maxl(2.5 ,1.522e2, -10.2) gives ",maxofs2);
}
Result
maxl(1, 2 ,5 ,10, 7 ,8) gives 10
maxl(2.5 ,1.522e2, -10.2) gives 152.2