[Oberon] Re (2): The Out module.

Jörg Straube joerg.straube at iaeth.ch
Fri Jan 11 17:57:41 CET 2019


„Out“ is basically a handy wrapper around „Texts“.
All standard tools use Texts instead of Out. Internally, Texts splits the writing in two parts:
- The different Write commands (WriteReal, WriteInt, WriteString...) These commands just fill an internal buffer but do not yet display anything
- and the Append command. This command actually displays the buffer filled by previous Writes. This command is relatively „expensive“ (CPU wise and memory wise) as it checks all visible windows, whether the text has to be displayed, and refreshes the window if it found a window where the buffer is visible.

The original Out.Mod just added to every Texts.Write command a Texts.Append command, so you don‘t have to bother with these Texts internals.

If you heavily use „Out“ for debugging reasons you sooner or later run out of memory as Append is an „expensive“ operation and the garbage collector only runs in idle mode.

Therfore, I optimized „Out“ a bit: the new default behaviour is that Append is delayed until the next Out.Ln. But you can fall back to the „old“ Out behaviour with the new command Out.Immediate(TRUE) if you wish to do so.

br
Joerg


Am 11.01.2019 um 16:59 schrieb <peter at easthope.ca> <peter at easthope.ca>:

>> You can google it or I can send it.
> 
> Not necessary thanks.  The mechanics are routine.
> 
> I just wondered whether Out was avoided deliberately.  Replaced with a 
> better means?  Apparently not.
> 
> Thanks,             ... Lyall E.
> 
> 
> 
> -- 
> Message composed and transmitted by software designed to avoid the 
> complication, overhead and vulnerability of antivirus software.
> 
> 123456789 123456789 123456789 123456789 123456789 123456789 123456789
> Tel: +1 360 639 0202                                  +1 
> http://easthope.ca/Peter.html              Bcc: peter at easthope. ca
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list