info-beamer

No support for bitwise operators?

Creating a package using lua it seems that it is not possible to use bitwise operators.

Error
Lua syntax error in node.lua:164: unexpected symbol near ‘&’

local val = 3
local b = val & 1
local g = val>>1 & 1

info-beamer uses LuaJIT. It as the built-in bit extension. See here.

-- Example: 
local bit = require "bit"
print(bit.band(bit.rshift(val, 1), 1))

There’s no dedicated operators for those.

1 Like
info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint