<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">> On a more general basis, the character "!" was clearly a</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">> hack. </span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">It was </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">meant an as exception to otherwise clean rules.</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">> Apparently, clean </span><span style="white-space: pre-wrap; font-family: monospace;" class="">rules led to restrictions, and the real</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">> life prevailed.</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Yes, it’s always been a hack - and one that got worse over</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">time, not better, unfortunately</span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">. </span></font><span style="font-family: monospace; white-space: pre-wrap;" class="">Back in 1988 there was in</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">fact no ! option. Then an option </span><span style="white-space: pre-wrap; font-family: monospace;" class="">stored in a global variable</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">diroptions was added pretty soon by someone. See the 1992</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">and 2005 </span><span style="font-family: monospace; white-space: pre-wrap;" class="">Editions of the book Project Oberon, which state:</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">  PROCEDURE List(..);</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">    ...</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">  BEGIN</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">    ....</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">    </span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">IF diroption = "d” THEN      (*<--- global variable*)</span></font></div><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">      Kernel.GetSector(adr, hp);</span><br class=""><span style="white-space: pre-wrap;" class="">      Texts.WriteString(W, " “);</span></font><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">      Texts.WriteDate(W, hp.time, hp.date);<br class="">      Texts.WriteInt(W,</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">        LONG(hp.aleng)*FileDir.SectorSize</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">        + hp.bleng - FileDir.HeaderSize, 8)</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    END</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    ...<br class=""></span></font><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">  END List;</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">  PROCEDURE Directory*;</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">    ...</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">  BEGIN</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">    ...</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    i := 0;<br class="">    WHILE (ch > " ") & (ch # "/") DO</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">      pat[i] := ch; INC(i); Texts.Read(R, ch)</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    END;</span><br class=""><span style="white-space: pre-wrap;" class="">    pat[i] := 0X;</span><br class=""><span style="white-space: pre-wrap;" class="">    IF ch = "/“ THEN</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">       Texts.Read(R, diroption)  (*<—global variable*)</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    ELSE diroption := 0X</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    END;</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">    ...</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">  END Directory;</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">So the option was a variable ‘diroptions’ and not</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">yet packed </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">into the pattern ‘pat'.</span></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Then suddenly someone had the idea to pack the ! option</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">into the </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">pattern itself (which is still the current</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">status quo), thereby </span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">eliminating the </span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">global variable</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">diroptions. </span></font><span style="font-family: monospace; white-space: pre-wrap;" class="">Why was it </span><span style="font-family: monospace; white-space: pre-wrap;" class="">done this way? I have no idea!</span></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">The clean solution would be:</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">1) to return to the original 1992/2005 approach </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">with</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">   a separate variable </span><span style="font-family: monospace; white-space: pre-wrap;" class="">diroptions.</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">2) to generalize procedure System.GetArg such that</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">   </span><span style="font-family: monospace; white-space: pre-wrap;" class="">also accepts Unix </span><span style="font-family: monospace; white-space: pre-wrap;" class="">style parameters -a, -b ...</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">All this exists in various places and in various</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">forms, e.g. regular </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">expression parsers in Native</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">Oberon. It </span><span style="white-space: pre-wrap; font-family: monospace;" class="">just isn’t part of Original Oberon -</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">which is a pity.</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">-AP</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> </span><br class=""></font><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div></div></div></body></html>