[Gambas-user] Possible error when doing math on bytes

Brian G brian at westwoodsvcs.com
Tue Jan 3 23:08:06 CET 2023

When I do math on bytes I get an overflow now when the value of the byte goes negative 
dim a as byte = 0 
dim b as byte = 24 
dim result as byte = a - b 

This causes an overflow error, where in the past it was just a negative number. 
Is this a bug or a new undocumented feature? 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230103/68395418/attachment.htm>

More information about the User mailing list