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

Jörg Straube joerg.straube at iaeth.ch
Tue Jan 15 17:04:11 CET 2019


I use Out in all my programs in ProjectOberon. This is the reason why I found out, that the huge amount of Texts.Append() in the original implementation will eat up a lot of memory.
BTW: I added printf() to my Out.Mod to further simplify output capability.

I used a BOOLEAN variable and the different output procedures follow this example:

PROCEDURE String(s: ARRAY OF CHAR);
BEGIN Texts.WriteString(W, s); Append END String;

Jörg

> Am 15.01.2019 um 16:29 schrieb <peter at easthope.ca> <peter at easthope.ca>:
> 
> From:    Chris Burrows <chris at cfbsoftware.com>
> Date:    Mon, 14 Jan 2019 07:16:50 +1030
>> Be aware that in Oberon-07 variables are now exported as read-only.
> 
> Date:    Tue, 15 Jan 2019 20:53:17 +1030
>> ... the simpler boolean variable version. 
> 
> In Active Oberon?  In Oberon-07, the switch is by an exported 
> procedure.  Also I'm trying to avoid frequent appearance of IF.  What 
> other way in Oberon-07?
> 
>> It does not look 'as simple as possible' to me ;-)
> 
> That's why I mentioned "devious".  A simpler (simplest?) way is 
> immediate and delayed versions of each procedure.  Eg. Out.Char(ch) 
> and Out.CharImmediate(ch), or Out.CharDelayed(ch) and Out.Char(ch).  
> Except that Out.Ln() is only immediate. A bigger module of course.
> 
> Another way is to exclude the immediate case.  In Out, provide only 
> Joerg's delay. For "immediate" output, fall back to Texts.WriteX().  
> Seems a reasonable compromise.
> 
> Or just exclude Out?  Does anyone use Out in V5?  What works in reality?
> 
> 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