<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><br class=""></div><div>chris</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">TYPE<br class=""> CharPtr = POINTER TO ARRAY OF CHAR;<br class="">VAR<br class=""> p : CharPtr;<br class="">BEGIN<br class=""> NEW(p, 1234);<br class=""></div></div></blockquote><div><br class=""></div><div>Ah I see, you are referring to Oberon-2 (1993) <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.37.9417&rep=rep1&type=pdf" class="">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.37.9417&rep=rep1&type=pdf</a></div><div><br class=""></div>NW designed two languages:</div><div>- the original Oberon <a href="https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.Report.pdf" class="">https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.Report.pdf</a> (1990)</div><div>- and his revision Oberon-07 <a href="https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.Report.pdf" class="">https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.Report.pdf</a> (2013/16)</div><div><br class=""></div><div>In the original Oberon, NW defined in the low level compiler module SYSTEM the procedure NEW(v, n).</div><div>In Oberon-07 this is not existing anymore. As Andreas Pickelbauer demonstrated, this functionality can be introduced with Oberon-07 without changing the language. I mean: it is not necessary to introduce NEW(p, n) in the Oberon-07 language as base construct as all means to do so are there already. Okay, I have to admit that you need to know how the OS implements memory management and garbage collection but this has nothing to do with the language.</div><div><div><br class=""></div></div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote><blockquote type="cite" class="">Leaving this undefined in the language report makes the type BYTE an <br class="">unusable feature for portable programs.</blockquote><div><br class=""></div><div>Whether the index i of the expression a[i] shall be checked is not defined in Oberon either. This is left to the implementation as you might want your code to be finetuned for speed (no checks) or security (with checks). Oberon-07 offers different methods for your concern: </div><div> ASSERT( (0 <= i) & (i <= 255) ); b := i; or</div><div> b := i MOD 256;</div><div><br class=""></div><div>I find BYTE quite useful. In the original Oberon, the comparable SHORTINT was signed, BYTE is unsigned. When e.g. parsing TCP packets and you wanted to calculate the port nbr, you couldn’t easily use SHORTINT. So, I often misused CHAR, as ORD(c) returns an unsigned value. As in the majority of cases bytes are treated unsigned, BYTEs makes the code a little bit more intuitive to read.</div><div><br class=""></div><div>br</div><div>Jörg</div><div><br class=""></div></body></html>