Returns the largest of the two arguments received.
1 math.max
<math.max>
<arg1 /> +
<arg2 /> +
</math.max>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Earg1 | numeric | ||||
Earg2 | numeric |
Returns | |
---|---|
Type | Description |
double |
Exceptions
requires 2 arguments
it requires 2 arguments.
numeric type required
The arguments must be numerics.
bad numeric data
Numerical argument no valid.
Example
Copy
<xsql-script name='max_sample1'> <body> <set name='arg1' type='decimal'>6.3</set> --> arg1 = 6.3 <set name='arg2' type='integer'>3</set> --> arg2 = 3 <println><math.max><arg1/><arg2/></math.max></println> --> max (6.3, 3) = 6.3 </body> </xsql-script>
Returns:
Copy
6.3
Example
Copy
<xsql-script name='max_sample2'> <body> <println><math.max><number>2</number>4</math.max></println> --> max (2, 4) = 4.0 </body> </xsql-script>
Returns:
Copy
4