gt: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=gt |proposed=false |trusted=false |description= This function compares provided numeric values and returns {{code|true(1)}} if the first is greater than...") |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
gt(n1, n2, ...) | gt(n1, n2, ...) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|n1|Number}} | {{param|n1|Number}} | ||
Line 15: | Line 15: | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: gt(2,1)] | [r: gt(2,1)] | ||
[r: gt(2,1,0)] | [r: gt(2,1,0)] | ||
[r: gt(2,1,1)] | [r: gt(2,1,1)] | ||
</ | </syntaxhighlight> | ||
'''Returns:''' | '''Returns:''' | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
1 | 1 | ||
1 | 1 | ||
0 | 0 | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
Line 33: | Line 33: | ||
[[Category:Macro Function]] | [[Category:Macro Function]] | ||
[[Category:Mathematical Function]] | [[Category:Mathematical Function]] | ||
[[Category:Logical Function]] |
Latest revision as of 23:59, 15 March 2023
gt() Function
This function compares provided numeric values and returns
true(1)
if the first is greater than the second and the second greater than the third and so no. If any comparison fails, the function returns false
.Usage
gt(n1, n2, ...)
Parameters
n1
- Numbern2+
- Number
Example
[r: gt(2,1)]
[r: gt(2,1,0)]
[r: gt(2,1,1)]
Returns:
1
1
0