how to get native bitwise operators?
Posted: Wed Feb 24, 2021 7:06 am
As I understand it, Lua 5.1 doesn't support native bitwise operators like & and |. However it can be worked around by including the bit module, but then the syntax becomes something like bit.band(a, b) and bit.bor(a,b). I have confirmed that this works by trying these functions on the command line of my ESP8266.
Lua 5.3 supports native bitwise operators, but I don't see a way to instruct nodemcu-build.com to build 5.3 based firmware. Is it possible?
I would prefer to use the 5.3 native bitwise operator syntax for compatibility with my host machine's Lua. If necessary I can do builds on my own PC, I have the toolchain and a clone of the NodeMCU git repo. But I'm hoping to be lazy and use nodemcu-build.com.
Thanks, and sorry if this is already answered somewhere that I didn't find with a search.
Lua 5.3 supports native bitwise operators, but I don't see a way to instruct nodemcu-build.com to build 5.3 based firmware. Is it possible?
I would prefer to use the 5.3 native bitwise operator syntax for compatibility with my host machine's Lua. If necessary I can do builds on my own PC, I have the toolchain and a clone of the NodeMCU git repo. But I'm hoping to be lazy and use nodemcu-build.com.
Thanks, and sorry if this is already answered somewhere that I didn't find with a search.