Project

General

Profile

Actions

Added in 3.9

$max(<space delimited tokens>)
$max(<comma,delimited,tokens>)

Returns the maximum value from a list of tokens.

By default it sorte tokens using the numeric sorting rules used by $sorttok 'n' switch.

See also $sorttok.

Parameters

Parameter Description
<space delimited tokens> If only one parameter is defined, it's treated as a list of space delimited tokens.
<comma,delimited,tokens> If multiple parameters is defined, it's treated as a list of comma separated tokens.

Properties

Property Description
.text Sorts tokens using the same text sorting rules used by $sorttok 'a' switch.
.textcs Sorts tokens using the same text sorting rules used by $sorttokcs 'a' switch.
.nick Sorts tokens using the same text sorting rules used by $sorttok 'c' switch.

Example

//echo -ag $max(6 7 2 4 1)
//echo -ag $max(6,7,2,4,1)

//echo -ag $max(b B a A c C).text
//echo -ag $max(b,B,a,A,c,C).text

_

Updated by Per Amundsen almost 2 years ago · 2 revisions

Also available in: PDF HTML TXT