[Gambas-user] Possible error when doing math on bytes
jussi.lahtinen at gmail.com
Tue Jan 3 23:35:29 CET 2023
On Wed, Jan 4, 2023 at 12:34 AM Jussi Lahtinen <jussi.lahtinen at gmail.com>
> It is a feature, but it is also documented.
> Bytes can have values only between 0 - 255.
> On Wed, Jan 4, 2023 at 12:30 AM Brian G <brian at westwoodsvcs.com> wrote:
>> 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
>> Is this a bug or a new undocumented feature?
>> "Failure is the key to success;
>> each mistake teaches us something" .. Morihei Ueshiba
>> Brian G
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User