or

From RPTools Wiki
Revision as of 20:41, 22 May 2020 by Phergus (talk | contribs) (Created page with "{{MacroFunction |name=or |proposed=false |trusted=false |description= This function performs a logical '''OR''' comparison between all of the passed numeric values. A value o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

or() Function

This function performs a logical OR comparison between all of the passed numeric values. A value of 0 is false and all non-zero values are treated as true. As long as one passed in value is true, the result will be true.

Usage

or(n1, n2, ...)

Parameters

  • n1 - Number
  • n2 - Number
  • n3+ - Number

Example

[r: or(1,1)]
[r: or(0,0)]
[r: or(1,1,0)]

Returns:

1
0
1

See Also