<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a href="mailto:gareth@moreton-family.com">gareth@moreton-family.com</a>> schrieb am Fr., 5. Juli 2019, 14:02:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm glad we agree on the "is" operator. Personally I would like to <br>
extend it so it accepts "if (I is TMyEnum) then" when I is also of type <br>
TMyEnum, since it may be the case that you're reading I directly from a <br>
stream, either individually or as part of a record, in which case <br>
converting I from an Integer to TMyEnum is a little inconvenient. When <br>
you get down to the compiled assembly language it shouldn't really <br>
matter anyway.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It might not matter from the assembly point of view, but it matters from the language point of view. When we say that enum values only contain valid values then "myenum is TMyEnum" *must* always evaluate to true, because otherwise there's an exception of the rule that enums only contain valid values. </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>