ne: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=ne |proposed=false |trusted=false |description= This functions checks for inequality between consecutive parameters. You can use it for string (case-ins...")
 
m (added logical category)
Line 39: Line 39:
[[Category:Macro Function]]
[[Category:Macro Function]]
[[Category:Mathematical Function]]
[[Category:Mathematical Function]]
[[Category:Logical Function]]
[[Category:String Function]]
[[Category:String Function]]

Revision as of 11:38, 9 February 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 and the result will be false.

Usage

ne(n1, n2, ...)
ne(s1, s2, ...)

Parameters

  • n1+ - Number
  • s1+ - 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

See Also