<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div dir="ltr" id="yui_3_16_0_ym19_1_1491581101272_6449"><br></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1491581101272_6448">Correction: This should read 'TypeDesc' of course, and not 'TypeTag' (which is the *address* of the TypeDesc).</div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1491581101272_6448"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1491581101272_6571" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1491581101272_6570"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1491581101272_6569"> <div dir="ltr" id="yui_3_16_0_ym19_1_1491581101272_6568"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1491581101272_6567"> <hr size="1"> <b id="yui_3_16_0_ym19_1_1491581101272_6614"><span style="font-weight:bold;" id="yui_3_16_0_ym19_1_1491581101272_6613">From:</span></b> Andreas Pirklbauer <<a href="mailto:andreas_pirklbauer@yahoo.com">andreas_pirklbauer@yahoo.com</a>><br> <b id="yui_3_16_0_ym19_1_1491581101272_6616"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1491581101272_6615">To:</span></b> ETH Oberon and Related Systems <<a href="mailto:oberon@lists.inf.ethz.ch">oberon@lists.inf.ethz.ch</a>> <br><br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1491581101272_6631">...</div><div class="y_msg_container" id="yui_3_16_0_ym19_1_1491581101272_6631"><br><div id="yiv4304464113"><div id="yui_3_16_0_ym19_1_1491581101272_6630"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;" id="yui_3_16_0_ym19_1_1491581101272_6629"><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr">You don't really need b) and c), so you could write something like:</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> TYPE TypeTag = RECORD size: LONGINT;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> ext: ARRAY 3 OF LONGINT;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> ptr: LONGINT;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> <other fields that you may want to add></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> END ;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr">Then create the "type tag" by writing:</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> VAR tag: TypeTag;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr">and initialise it with:</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> tag.size := <size of your object to be allocated>;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> tag.ext[0] := 0; tag.ext[1] := 0; tag.ext[2] := 0;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"> tag.ptr := -1;</div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><br></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr">4. If you want your objects to be automatically collected by the Oberon garbage collector, you must make it globally reachable via a global pointer. Then they will appear in mod.ptr in the module block which are used as roots for the garbage collector. (Oberon uses all named pointer variables in existence as roots<font face="ArialMT" size="2" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_5223"> for the mark phase of the garbage collector. See Oberon.GC for the details. It simply calls Kernel.Mark(mod.ptr) for each loaded module mod.</font></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><font face="ArialMT" size="2"><br></font></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><font face="ArialMT" size="2"><br></font></div><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_2588" dir="ltr"><font face="ArialMT" size="2" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_5237">And</font>r<span style="font-family:ArialMT;font-size:small;" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_5238">eas</span></div>
<div title="Page 106" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4566" title-off="">
<div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4567">
<div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4568">
<div dir="ltr" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4569"><br></div>
</div>
</div>
</div><div title="Page 106" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4475" title-off=""><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4476"><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4477"><div title="Page 106" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4496" title-off=""><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4497"><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4498"><div title="Page 106" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4517" title-off=""><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4518"><div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4519">
<div title="Page 106" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4538" title-off="">
<div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4539">
<div id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4540">
<div dir="ltr" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4541"><span style="font-size:10.000000pt;font-family:'ArialMT';" id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4542"> <br id="yiv4304464113yui_3_16_0_ym19_1_1491577030619_4543"></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div></div><br><br></div> </div> </div> </div></div></div></body></html>