<html><body><div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Nov 14, 2024 at 8:11:53 PM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
Because it wasn't deemed necessary that the compiler itself provides this operator. <br>
</blockquote>
</div>
<div dir="ltr"><br></div><div dir="ltr">You can use it to create ordinal types from bytes using a generic. I was trying to do something like this. If you do other operations on constants it makes to include powers too. Of course you can solve this a number of other ways too but I preferred this one.</div><div dir="ltr"><br></div><div dir="ltr"><div>type</div><div> SomeInt<const A, B: Byte> = record</div><div> header: 0..(256**A) - 1;</div><div> footer: 0..(256**B) - 1;<br></div><div> end;</div></div><div dir="ltr"><br></div><div dir="ltr">SomeInt<4, 3><br></div><div dir="ltr"><br></div><div dir="ltr"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,</div> Ryan Joseph</div></div><br>
</div></body></html>