🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3674

invisibility of imports

#3674
From: 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
Technical Details
Message-ID: <8705200759.AA15328@cayuga.cs.rochester.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!sdcsvax!ucbvax!suny-bing.CSNET!SULLIVAN

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!sdcsvax!ucbvax!suny-bing.CSNET!SULLIVAN
From: SULLIVAN@suny-bing.CSNET.UUCP
Newsgroups: comp.lang.modula2
Subject: invisibility of imports
Message-ID: <8705200759.AA15328@cayuga.cs.rochester.edu>
Date: Tue, 19-May-87 23:06:00 EDT
Article-I.D.: cayuga.8705200759.AA15328
Posted: Tue May 19 23:06:00 1987
Date-Received: Thu, 21-May-87 06:33:09 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 43