Re: bitwise operations limited to 32 bits

new topic     » goto parent     » topic index » view thread      » older message » newer message
SPringle said...

Why not use the type checking facility:

type register_bit(integer i) 
   return i > 0 or i < 33 
end type 
 
function setBit(atom mask, register_bit bit) 
    return or_bits(mask,power(2,bit-1)) 
end function 

I think this feature is quite under-appreciated.

I was going to use that but it complicated the message I was trying to get across, also a problem with the current type system is that without type_check can be used to get around it.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu