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

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Mar 22 15:55:23 CET 2014


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



On Sat, Mar 22, 2014 at 10:08 AM, <gambas at ...2524...> wrote:

>
> Comment #2 on issue 516 by rezeden... at ...626...: bug BSet -1
> http://code.google.com/p/gambas/issues/detail?id=516
>
> Copy what happens in the debug console. (Копирую то что происходит у меня в
> консоли отладки.)
>
> ? bset(-1,2)
> -1
>
> I do not know this bug or feature and should not work with negative
> numbers. (Я не знаю ошибка это или функция и не должна работать с
> отрицательными числами.)
>
> --
> 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
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list