Re: and_bits() behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message

c.k.lester wrote:

> Should this be right?
> 
> ADMIN_ONLY = 128
> btype = -1
> 
> ?and_bits(ADMIN_ONLY,btype)
> 
> It's returning 128!

That's OK.
Run the following code, and maybe then you can solve the riddle yourself. smile
include machine.e
? int_to_bits(-1, 8)

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu