Difference between revisions of "BitOr"

From MiniScript Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
bit is set in either (or both) of the arguments.
 
bit is set in either (or both) of the arguments.
  
See also: [[bitAnd]] [[bitXor]]
+
See also: [[bitAnd]]; [[bitXor]]
  
 
=== Arguments ===
 
=== Arguments ===
Line 14: Line 14:
 
| ''j'' || number, default 0 || second integer argument
 
| ''j'' || number, default 0 || second integer argument
 
|}
 
|}
 
 
=== Usage Notes ===
 
<c>funcname</c> may be called either as a global method, passing the sequence or map as an argument; or as a member function (defined on [[list]], [[string]], and [[map]]) using [[dot syntax]], with no arguments.
 
  
 
== Example ==
 
== Example ==

Latest revision as of 23:10, 15 March 2020

bitOr treats its arguments as integers, and computes the bitwise `or`: each bit in the result is set if the corresponding bit is set in either (or both) of the arguments.

See also: bitAnd; bitXor

Arguments

Parameter Name Default Value Meaning
i number, default 0 first integer argument
j number, default 0 second integer argument

Example

bitOr(14, 7)    // returns 15