ne: Difference between revisions
Jump to navigation
Jump to search
Bubblobill (talk | contribs) m (added logical category) |
No edit summary |
||
Line 4: | Line 4: | ||
|trusted=false | |trusted=false | ||
|description= | |description= | ||
This functions checks for inequality between consecutive parameters. You can use it for string (case-insensitive) or numeric comparisons but not both at the same time. Passing in a mix of strings and numbers will always return {{code|false}}. Any failed comparison and the result will be {{code|false}}. | This functions checks for inequality between consecutive parameters. You can use it for string (case-insensitive) or numeric comparisons but not both at the same time. Passing in a mix of strings and numbers will always return {{code|false}}. Any failed comparison (that is: if any two parameter in the list are equal) and the result will be {{code|false}}. | ||
|usage= | |usage= |
Revision as of 19:54, 4 November 2021
ne() Function
This functions checks for inequality between consecutive parameters. You can use it for string (case-insensitive) or numeric comparisons but not both at the same time. Passing in a mix of strings and numbers will always return
false
. Any failed comparison (that is: if any two parameter in the list are equal) and the result will be false
.Usage
ne(n1, n2, ...)
ne(s1, s2, ...)
Parameters
n1+
- Numbers1+
- String
Example
[r: ne(1, 0)]
[r: ne(1, 1, 0)]
[r: ne(4, 2, 4)]
[h: species = "duck"]
[r: ne(species, "Duck")]
[r: ne(species, "Chicken")]
Returns:
1
0
1
0
1