bit.bor

Bitwise 'or'

Prototype

n = bit.bor (a, b, ...)

Description

This takes one or more arguments. All are converted to signed 'long long' (64-bit integers). The result is all arguments "or-ed" together bitwise.
eg.

print (bit.bor (1, 2, 8)) --> 11
Effectively this sets bits (eg. flags).

Note that clearing a bit can be done with bit.clear.

Lua functions

Topics