<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:Consolas;
mso-fareast-language:EN-US;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 122.9pt 72.0pt 122.9pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>-----Original Message-----</span></p><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Andreas</span></p><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>Pirklbauer</span></p><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>Sent: Saturday, 5 September 2020 5:35 AM</span></p><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>To: Oberon List</span></p><p class=MsoPlainText>> <span lang=EN-US style='mso-fareast-language:EN-AU'>Subject: [Oberon] Module Fonts without reference to SYSTEM</span></p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Below is one way to do it. It used ORD for pointers (undocumented feature).</p><p class=MsoPlainText>> </p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'>If not a bug, at best I would classify the ability to use ORD to typecast a pointer to an INTEGER as a ‘loophole’. Refer to the Section titled 'Loopholes' in 'Good Ideas, Through the Looking Glass', Niklaus Wirth 2005.<o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'><a href="https://people.inf.ethz.ch/wirth/Articles/GoodIdeas.pdf">https://people.inf.ethz.ch/wirth/Articles/GoodIdeas.pdf</a><o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'>This loophole is exploited in several modules in Project Oberon. Fortunately all but one occurrence can be eliminated by replacing ORD(...) with SYSTEM.VAL(INTEGER, ...) as all of those modules already import SYSTEM. <o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'>The remaining occurrence is in Texts.WriteReal <o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'> e := ASR(ORD(x), 23) MOD 100H; (*binary exponent*)<o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'>Texts does not already IMPORT SYSTEM. However, that does not matter as a more suitable replacement in this instance is: <o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'> UNPK(x, e); <o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p><p class=MsoPlainText><span style='color:black'>Regards,<o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'>Chris Burrows<o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'>CFB Software<o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><a href="https://www.astrobe.com/RISC5">https://www.astrobe.com/RISC5</a><o:p></o:p></span></p><p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p></div></body></html>