<div dir="ltr"><div>Very good point. However, the OP gave the expected range, which is for 32 bits.</div><div><br></div><div><br></div><div>Jussi<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 10, 2018 at 9:00 PM, Tobias Boege <span dir="ltr"><<a href="mailto:taboege@gmail.com" target="_blank">taboege@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, 10 Jun 2018, Jussi Lahtinen wrote:<br>
> > An integer type is obviously not wide enough.<br>
> ><br>
> <br>
> It is. You need 32 bits and Gambas integer is 32 bits. Gambas just<br>
> interprets/displays the most significant bit as sign bit.<br>
> <br>
<br>
</span>I believe the C standard leaves the width of size_t open. When it speaks<br>
about "an unsigned integer type", that does not necessarily mean it's<br>
*the* "unsigned int" of which we could maybe expect that it's 32 bits wide.<br>
<br>
FWIW, on my system, size_t is 64 bits wide, like unsigned long and unlike<br>
unsigned int:<br>
<br>
$ echo -e '#include <stdio.h> \n #include <stddef.h> \n int main(void) { printf("%u\\n", sizeof(size_t)); }' | gcc -x c - && ./a.out<br>
8<br>
<br>
Regards,<br>
Tobi<br>
<span class="HOEnZb"><font color="#888888"><br>
-- <br>
"There's an old saying: Don't change anything... ever!" -- Mr. Monk<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</div></div></blockquote></div><br></div>