<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Martin Frb via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> schrieb am Fr., 29. Dez. 2023, 20:38:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
fpc 3.2.3<br>
The below prog prints 3 times: 11, -1 (signed values)<br>
<br>
<a href="https://www.freepascal.org/docs-html/current/ref/refsu4.html#x26-250003.1.1" target="_blank" rel="noreferrer">https://www.freepascal.org/docs-html/current/ref/refsu4.html#x26-250003.1.1</a><br>
<blockquote type="cite">Free Pascal also supports the <span>ByteBool</span>, <span>WordBool</span>,
<span>LongBool </span>and <span>QWordBool
</span>types. These are of type <span>Byte</span>,
<span>Word</span>, <span>Longint
</span>or <span>Int64</span>, </blockquote>
<br>
Besides the fact that a "QWordBool" should be "Int64", they all seem
to be treated as signed.</div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The prefix refers to the width, not whether they are signed or not. </div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
Yet at least the first two of them are documented as unsigned.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Internally they are handled as signed, but in the end it doesn't matter, because the only thing that counts for them is whether they're "0" aka "False" or "not 0" aka "True" (though that doesn't mean that all bits need to set, just that any bit needs to be 1).</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>