Sintassi
Dà il più grande dei valori che riceve, quanti che siano.
Max(<value>, <value> [, <value>…])Le parti
| <value> | Un numero. Un testo che contiene un numero, come "12", viene letto come quel numero. |
|---|
Restituisce
Il valore più grande, come numero. NaN quando un valore non è un numero. Senza alcun valore, -Infinity.
Da sapere
- Min(Max(x, low), high) mantiene
xtralowehigh. Maxnon guarda dentro un array: Max(scores) dàNaN. Passa le celle, oppure percorri l'array conFOR.- Una FUNCTION chiamata
Maxnel tuo programma sostituisce questa.
Esempio
BASIC
hp = 130hp = Min(Max(hp, 0), 100)Console(Str(hp)) ' 100Console(Str(Max(3, 9, 12))) ' 12Nel manuale : Costanti e operatori