<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><<a href="mailto:wkitty42@windstream.net">wkitty42@windstream.net</a>> schrieb am Mi., 25. März 2020, 19:48:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 3/25/20 2:17 PM, Sven Barth via fpc-pascal wrote:<br>
> <a href="mailto:wkitty42@windstream.net" target="_blank" rel="noreferrer">wkitty42@windstream.net</a> schrieb am Mi., 25. März 2020, 18:47:<br>
> <br>
>> hummm... ok, so how to you get a constant to be a byte and storing 7 for the<br>
>> decimal value?<br>
> <br>
> <br>
> The compiler normally uses the smallest possible type that can represent the <br>
> value. You can force it however by using e.g.<br>
> <br>
> const<br>
>    MyConst = Word(42);<br>
<br>
<br>
ok... so in the situation this thread is covering:<br>
<br>
const<br>
   foldhiddenbit = byte(7);<br>
   foldhiddenmask = byte(1 shl foldhiddenbit);<br>
   currentfoldhiddenbit = byte(6);<br>
   currentfoldhiddenmask = byte(1 shl currentfoldhiddenbit);<br>
   foldlevelmask = byte(not (foldhiddenmask or currentfoldhiddenmask));<br>
<br>
is the way to do it?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">In theory, yes, but for some reason the "not" upsets this. I have yet to investigate why though and whether this is by design. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </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">
</blockquote></div></div></div>