<div dir="ltr"><span style="font-size:12.8px">> RETURN " " END is valid</span><div><span style="font-size:12.8px"><br></span><div class="gmail_extra">This is not valid, because in Oberon, a functional procedure can not have ARRAY OF CHAR as return type (nor can it return a RECORD). The valid return types are INTEGER, REAL, CHAR, BOOLEAN, SET, POINTER TO ...</div><div class="gmail_extra">"RETURN END" is not a valid construct in an Oberon program not because of the because of the syntax rules, but because of the semantic rules. To show the difference, consider this statement:</div><div class="gmail_extra">IF '5' < 10 THEN END. This is an absolutely valid statement syntaxically, but it is not valid because of the type mismatch (you can't compare expression of type CHAR to an expression of type INTEGER).</div><div class="gmail_extra"><br></div><div class="gmail_extra">> <span style="font-size:12.8px">LOOP would be a more generic way iso using REPEAT and/or WHILE.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">LOOP can not replace REPEAT and/or WHILE. LOOP + IF can, but not LOOP by itself.</span></div><div class="gmail_extra"><span style="font-size:12.8px">If you want to make the Oberon compiler restrict programmers to only use IF ... THEN EXIT END statement in the beginning or in the end of the LOOP statement, and only once, then the source code of the compiler will get a lot more complex, as this would no more be a syntax rule, but a semantic rule.</span></div><div class="gmail_extra"><br></div><div class="gmail_extra">Kind regards,<br>Artur Efimov</div></div></div>