<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:10pt;font-family:"Calibri", sans-serif;}
#qt a:link{color:blue;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Mon, Aug 28, 2023, at 13:15, <a href="mailto:joerg.straube@iaeth.ch">joerg.straube@iaeth.ch</a> wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">August</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;"> </span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">In Oberon-07 it is defined as follows:</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">The type T of the case expression (case variable) may also be a record or pointer type. Then the</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">case labels <b>must be extensions of T</b>, and in the statements Si labelled by Ti, the case variable is</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">considered as of type Ti.</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;"> </span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">PROCEDURE Draw (s: Shape)</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">BEGIN</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;"> CASE s OF<br> Rectangle: ... |<br> Circle: ... |<br> Shape: ... </span><span class="font" style="font-family:Wingdings;"><span class="size" style="font-size:11pt;"></span></span><span class="size" style="font-size:11pt;"> this is not allowed as “Shape” is not an extension of “Shape”<br> END<br> </span><span class="size" style="font-size:11pt;">END Draw;</span></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;"> </span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;">Jörg</span><br></p><p class="qt-MsoNormal"><span class="size" style="font-size:11pt;"> </span><br></p></div></blockquote><div><br></div><div><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">A record type is also an extension of itself. So that is valid.</span></span></span><br></div><div><br></div><div><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">--</span></span></span><br></div><div><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Diego Sardina</span></span></span><br></div><div><br></div></body></html>