This version is out of date, covering development as far as v4.2.5. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
A Tinderbox Reference File : Actions & Rules : Set-based operators : max() operator |
max() operator |
The v4.0.0 max() operator returns the largest item in a set.
Both the operators max() and min() use lexical comparison in most cases, but numeric comparison if the context is numeric, e.g.:
Width=max("1;100;2")
Since "Width" is numeric, max() will be return 100.
Name=max("1;100;2")
Since "Name" is a string, max() will return 2.
If you don't have a set, create one on the fly:
MyMax = max(collect(all,$MyNum))
A 'lexical sort' is a case-insensitive sort (Aardvark,aarvark,ABLE) and for numbers "2;70;100;" would sort in order "100;2;70" (i.e. ordered on first number first - a number 'computer sort' )
Up: Set-based operators | |
Previous: count() operator | Next: min() operator |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]