<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 16.07.2017 11:07, Michael Van
Canneyt wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.20.1707161103370.663@home.telenet.be">
You are missing the point of an enumerated.
<br>
<br>
The whole point of using an enumerated is that range checking *is
not necessary*, because the values are 'by definition' correct.
<br>
<br>
If the compiler cannot assume this, you're just using an integer
with some named values. Hardly worth a separate type.</blockquote>
<br>
No, I am not missing the point. I try to explain to you that if you
understand enumerated types as strict values from a set, you
completely have to redesign the way they work (see my previous
emails) - which is not doable with current Pascal philosophy.<br>
<br>
For now, Pascal enumerated types work as aliases for underlying
ordinal values - a concept that is exactly the same as C enums:<br>
<br>
<a class="moz-txt-link-freetext" href="https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.pdf">https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.pdf</a> page 11:<br>
<b>"An enumeration is a custom data type used for storing constant
integer values and referring to them by names."</b><br>
<br>
page 12:<br>
<b>"Although such variables are considered to be of an enumeration
type, you can assign them</b><b><br>
</b><b>any value that you could assign to an int variable, including
values from other enumerations.</b><b><br>
</b><b>Furthermore, any variable that can be assigned an int value
can be assigned a value from</b><b><br>
</b><b>an enumeration."<br>
<br>
</b>What you did is you introduced one feature from high-level
enumeration (case optimization) but kept all other features from
low-level enumerations. Do it properly (=break existing code) or
don't do it at all.<b><br>
</b><br>
Well, I have used all arguments I could think of...<br>
<br>
Ondrej<br>
</body>
</html>