<div dir="ltr"><div>As integer.</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 8:27 PM, Demosthenes Koptsis <span dir="ltr"><<a href="mailto:demosthenesk@gmail.com" target="_blank">demosthenesk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>i dont understand,</p>
<p>i have an external function from libc and i see size_t as
datatype.</p>
<p>size_t is unsigned integer</p>
<p>on function declaration what should i set for size_t, AS Integer
or AS Long?</p>
<p>for example i have this</p>
<p>'void setbuffer (FILE *stream, char *buf, size_t size)<br>
Public Extern setbuffer(stream As Pointer, buf As Pointer, size As
Integer) 'FIXME size_t int or long?<br>
</p><div><div class="h5">
<br>
<div class="m_-4440897856783728541moz-cite-prefix">On 06/10/2018 07:45 PM, Jussi Lahtinen
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>So, it's 32bit integer. Most likely the library reads only
32 bit from the memory, and thus "long" wont help you.<br>
</div>
<div><br>
</div>
<div> Gambas integer reserves one bit for sign and thus returned
values are not correctly displayed in Gambas side.</div>
<div>However you can display them correctly by using binary
representation.</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 6:38 PM,
Demosthenes Koptsis <span dir="ltr"><<a href="mailto:demosthenesk@gmail.com" target="_blank">demosthenesk@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hello,<br>
<br>
i want to use an unsigned int in external function, which
gambas datatype should i use?<br>
<br>
Integer or Long?<br>
<br>
The range of values is 0 to 4,294,967,295<br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a>
]----<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_-4440897856783728541mimeAttachmentHeader"></fieldset>
<br>
<pre>----[ Gambas mailing-list is hosted by <a class="m_-4440897856783728541moz-txt-link-freetext" href="https://www.hostsharing.net" target="_blank">https://www.hostsharing.net</a> ]----
</pre>
</blockquote>
<br>
</div></div></div>
<br><br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br></blockquote></div><br></div>