[Gambas-user] unsigned int datatype for external function
Demosthenes Koptsis
demosthenesk at gmail.com
Sun Jun 10 20:20:41 CEST 2018
so your advice is to use Integer not Long.
is this right?
On 06/10/2018 09:10 PM, Jussi Lahtinen wrote:
>
> 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?
>
>
> They both contain 32bits of information, unsigned or not. Signed
> integer only means that the most significant bit is reserved for the sign.
> When the library reads the signed value, it ignores the original
> meaning of the most significant bit, because it assumes it as unsigned.
>
>
> Jussi
>
>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180610/56b0150e/attachment.html>
More information about the User
mailing list