[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: boolean operators
- From: "Andrew Wilson" <agrwagrw@...>
- Date: Wed, 20 Sep 2006 17:10:48 -0400
Bitwise operators are a must have to program registers of hardware devices on embedded firmware. You typically program hardware by flipping bits on and off in these registers and by checking bits state in registers. If lua is to be used in firmware to program hardware interfaces you need bitwise operator to get to bit-fields of hardware registers. AGRW
On 9/20/06, Tim Gogolin <tgogolin@adobe.com> wrote:
I wrote (in lua) a lua "linting" function that required them. I parse
the byte-code of a compiled chunk. So I had to write some bit-field
extraction helpers in C: argBFromInstruction(), etc.
--
Tim Gogolin
On Sep 20, 2006, at 3:06 PM, Roberto Ierusalimschy wrote:
> Sam Roberts wrote:
>> Other than lua doesn't have the C boolean operators (&&, ||, !),
>> which
>> I keep forgetting [...]
>
> May I ask you (and others) why you need boolean operators in Lua?
> (This
> is not a rhetorical question. I really want to know what uses boolean
> operators may have in Lua.)
>
> -- Roberto