[Oberon] Module contexts in Original Oberon 2013

Jörg joerg.straube at iaeth.ch
Tue May 8 18:41:35 CEST 2018


Hi

The file A.Mod can have the following content MODULE B; END B.
If you compile A.Mod the compiler will generate B.Obj.
The compiler will not check this inconsistency between file name and module
name; he will create the file name of the object file based on the module
name, not on the file name of the source file.

If you compile this text in Active Oberon with contexts "MODULE B IN Win32;
END B." The compiler will generate the file Win32.B.Obj.

You can reach almost the same effect in standard Oberon by compiling "MODULE
Win32B; END Win32B." The generated file is Win32B.Obj. Almost the same as
above, only with missing dot.
With context you write "IMPORT B IN Win32;". In legacy Oberon, you write
"IMPORT B := Win32B;"

br
Jörg


-----Original Message-----
From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
peter at easthope.ca
Sent: Tuesday, May 08, 2018 5:07 PM
To: oberon at lists.inf.ethz.ch
Subject: Re: [Oberon] Module contexts in Original Oberon 2013

From:	Andreas Pirklbauer <andreas_pirklbauer at yahoo.com>
Date:	Tue, 8 May 2018 04:39:32 +0200
> OTOH, I may not be familiar with some other use
> cases that might exist on other systems currently
> being used. Any input from A2 users?

What happened to Wirth's early principle of de-emphasizing files in 
favour of text or data in memory?  When a distinction is in a file 
name and not in the contained source text, the principle is ignored?

In "Proposal for Modules Contexts", 2.1 Language extensions, Friedrich 
and Negele wrote "... classifications based on ... different 
source-code file names are not sufficient."  Whereas Joerg wrote "... 
without contexts you still have the possibility to group your files by 
prefixing them (just without dot)." and "... use the existing alias 
method for IMPORT."  The two claims are contradictory?

Thanks,                               ... Lyall E.
-- 
This message was composed and transmitted by software designed to 
avoid the need, overhead and vulnerability of antivirus software.

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                      Pender Is.: +1 250 629 3757
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