[Gambas-user] unsigned int datatype for external function

T Lee Davidson t.lee.davidson at gmail.com
Sun Jun 10 19:48:29 CEST 2018


On 06/10/2018 01:42 PM, Jussi Lahtinen wrote:
>     An integer type is obviously not wide enough.
> 
> 
> It is. You need 32 bits and Gambas integer is 32 bits. Gambas just interprets/displays the most significant bit as sign bit.
> 
> 

That means that the Gambas integer type is only 31 (+ 1) bits wide. Not wide enough to hold a 32-bit unsigned integer if the
highest bit is reserved for the sign bit.

So then, if it is wide enough as you say, how would one manage a 32-bit unsigned integer in a 32-bit signed datatype?


-- 
Lee


More information about the User mailing list