Log In  

This program

print(fget(1,3))
fset(1,3,false)
print(fget(1,3))

returns this output:
>false
>true

Simply put, fset sets bits to true and never false. Am I horribly misunderstanding the fset function, or is it a bug? -_-

P#25841 2016-07-24 22:16 ( Edited 2016-07-25 22:30)

Yep, seems broken to me! Does not do what the docs say.

fset(1,0) does work however, so you can compute the value witht the bit unset using band and bnot

P#25843 2016-07-24 22:36 ( Edited 2016-07-25 02:36)

Fixed for 0.1.9, thanks!

P#25874 2016-07-25 18:30 ( Edited 2016-07-25 22:30)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-02-26 22:06:45 | 0.007s | Q:12