and: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
and(n1, n2, ...) | and(n1, n2, ...) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 16: | Line 16: | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: and(1,1)] | [r: and(1,1)] | ||
[r: and(1,1,0)] | [r: and(1,1,0)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Returns:''' | '''Returns:''' | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
1 | 1 | ||
0 | 0 |
Latest revision as of 23:59, 14 March 2023
and() Function
This function performs a logical AND comparison between all of the passed numeric values. A value of 0 is
false
and all non-zero values are treated as true
Usage
and(n1, n2, ...)
Parameters
n1
- Numbern2
- Numbern3+
- Number
Example
[r: and(1,1)]
[r: and(1,1,0)]
Returns:
1
0