Superseded / Deprecated
The feature described in this article has been superseded by a newer feature. This feature still works in PICO-8, but the new feature should be used instead. See the article's "Superseded by..." section for specific details.
bor( first, second )
Calculates the bitwise or of two numbers.
first
The first number.

second
The second number.

Superseded by | operator[edit | edit source]

The | operator added in 0.2.0 performs the same function as bor() and is now the recommended way to do bitwise or, as it uses fewer tokens, costs fewer cycles at runtime, and runs on the real host CPU much more efficiently. Simply replace bor(a,b) with a|b.

Examples[edit | edit source]

--     0x5 = 0101 binary
--  or 0x9 = 1001 binary
-- -------
--     0xd = 1101 binary
print(bor(0x5, 0x9))  -- 13 (0xd)

print(0x5 | 0x9)      -- preferred method

See also[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.