Lingo Dictionary > L-N > max() |
![]() ![]() ![]() |
max()
Syntax
list.max()
max(
list
)
max(
value1
,
value2
,
value3
, ...)
Description
Function; returns the highest value in the specified list or the highest of a given series of values.
The max
function also works with ASCII characters, similar to the way <
and >
operators work with strings.
Example
This handler assigns the variable Winner
the maximum value in the list Bids
, which consists of [#Castle:600, #Schmitz:750, #Wang:230]. The result is then inserted into the content of the field cast member Congratulations.
on findWinner Bids Winner = Bids.max() member("Congratulations").text = \ "You have won, with a bid of $" & Winner &"!" end
![]() ![]() ![]() |