[Oberon] Module aliases - what is the correct way to handle them

Joerg joerg.straube at iaeth.ch
Mon Jul 13 17:57:04 CEST 2020


Tomas

Debug output could be coded like this
    IMPORT Out, Debug := Out;
and all your debug output like Debug.Str(“packet sent“) appears on screen.

A „stub“ of Out looks like this

MODULE OutStub;

PROCEDURE Char*(ch: CHAR); END Char;
PROCEDURE String*(s: ARRAY OF CHAR);
  END String;
PROCEDURE Int*(i, n: INTEGER); END Int;
PROCEDURE Ln*; END Ln;

END OutStub;

if you want to use it, you write

IMPORT Out, Debug := OutStub;

and „magically“ all your debug ouput is not written to screen.

br
Jörg

> Am 13.07.2020 um 16:50 schrieb Tomas Kral <thomas.kral at email.cz>:
> 
> On Sun, 12 Jul 2020 13:15:50 -0700
> peter at easthope.ca wrote:
> 
>> Paul Reed mentioned the tidy idea of deactivating a module by
>> aliasing to a stub.
> 
> Hi,
> 
> I wish I new what stub is, and how I can use one.
> 
> I was thinking of running Oberon server with compiler.
> Compiler output directed to a file, or to RS232 stream,
> clients running Oberon0 command interpreter.
> 
> -- 
> Tomas Kral <thomas.kral at email.cz>
> --
> 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