🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.modula2
1 messages
1 total messages Started by SULLIVAN Wed, 20 May 1987 03:06
invisibility of imports
#3674
Author: SULLIVAN
Date: Wed, 20 May 1987 03:06
43 lines
1618 bytes
I fail to understand the controversy over the alleged invisibility in the 
implementation module of identifiers which are imported in the definition
module with the DEC (Powell) compiler.  The following (rather silly) example 
compiles and runs on my system!  I think it is Version 1.1, although it is
rather hard to tell.  At any rate the definition modules provided with the
system are dated late 1984.  Maybe someone has an outdated version of the
compiler?  Can someone supply an example of invisibility?

File Mod1.def:
DEFINITION MODULE Mod1;
EXPORT QUALIFIED n;
CONST n = 3;
END Mod1.

File Mod1.mod:
IMPLEMENTATION MODULE Mod1;
BEGIN
END Mod1.

File Mod2.def:
DEFINITION MODULE Mod2;
FROM Mod1 IMPORT n;
END Mod2.

File Mod2.mod:
IMPLEMENTATION MODULE Mod2;
FROM Text IMPORT WriteCardinal, WriteLn;
CONST m = n;
BEGIN
   WriteCardinal(m);
   WriteLn
END Mod2.

File Test.mod:
MODULE Test;
IMPORT Mod2;
BEGIN
END Test.

Fred Sullivan
Dept. Math. Sci.
SUNY at Binghamton
sullivan@suny-bing.csnet
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads