Zinthos
Zinthos

Reputation: 107

Bitwise operators in Lua for Windows?

I am currently using Lua for Windows, and my current project deals with binary files. I need the XOR bitwise operator however, I don't think Lua for Windows have a bitwise operator library since it's still version 5.1 (a bitwise operator library was added in 5.2). Is there a way to get bitwise operators in Lua for Windows (version 5.1)?

Thanks!

Upvotes: 0

Views: 1209

Answers (1)

finnw
finnw

Reputation: 48619

LuaBitOp is included with Lua For Windows, so you just need to add

require 'bit'

at the top of your program.

Upvotes: 4

Related Questions