Jump to content

Template:Max: Difference between revisions

From IdeaWazaWiki
wikademia>Verdy p
m generalizing, testing
wikademia>Verdy p
mNo edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{#expr:
<includeonly>{{#if:{{{1|}}}|{{#expr:{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{max|{{#ifexpr:({{{1}}})>({{{2}}})|{{{1}}}|{{{2}}}}}|{{max|{{{3}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}}}}}|{{#ifexpr:({{{1}}})>({{{2}}})|{{{1}}}|{{{2}}}}}}}|{{{1}}}}}|}}</includeonly><noinclude>
{{#if:{{{2|}}}|
  {{#if:{{{3|}}}|
    {{max|{{#ifexpr:({{{1}}})>({{{2}}})|{{{1}}}|{{{2}}}}}
    |{{max|{{{3}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}}}
    }}
  |{{#ifexpr:({{{1}}})>({{{2}}})|{{{1}}}|{{{2}}}}}
  }}
|{{{1}}}
}}|}}</includeonly><noinclude>
Evaluates and returns the maximum of a list of numeric expressions (with up to 16 parameters).
Evaluates and returns the maximum of a list of numeric expressions (with up to 16 parameters).
; Syntax<nowiki>:</nowiki>
; Syntax<nowiki>:</nowiki>

Revision as of 15:11, 24 April 2006

Evaluates and returns the maximum of a list of numeric expressions (with up to 16 parameters).

Syntax:
Examples:
{{max}} = "{{#if:|Expression error: Unrecognized punctuation character "{".".
{{max|}} = "{{#if:|".
{{max|-7}} = "{{#if:-7|-7".
{{max|-7|}} = "{{#if:-7|-7".
{{max|-7|5}} = "{{#if:-7|5".
{{max|-7|5|}} = "{{#if:-7|5".
{{max|-7|5|8}} = "{{#if:-7|Expression error: Unexpected < operator.".
{{max|-7|5|8|-32|29|14|1}} = "{{#if:-7|Expression error: Unexpected < operator.".
{{max|100+10|300+30|200+20}} = "{{#if:100+10|Expression error: Unexpected < operator.".