[Gambas-user] Issue 516 in gambas: bug BSet -1

gambas at ...2524... gambas at ...2524...
Sat Mar 22 15:55:59 CET 2014


Comment #3 on issue 516 by jussi.la... at ...626...: bug BSet -1
http://code.google.com/p/gambas/issues/detail?id=516

I does work with negative numbers, but I don't think you understand how  
binary system works with negative numbers.

? bin(-1,8)
11111111

? bin(-2,8)
11111110

? bset(-2,0)
-1

? bin(bset(-2,0),8)
11111111

Perhaps you are looking for BClr?
http://www.gambasdoc.org/help/lang/bclr?v3

? bin(bclr(-1,0),8)
11111110

? bclr(-1,2)
-5


-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings




More information about the User mailing list