🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3779

Re: some questions about modula2

#3779
From: Randy Bush
Date: Tue, 25 Aug 1987 21:06
29 lines
1845 bytes
In article <803@newton.physics.purdue.edu> cca@newton.physics.purdue.edu (Charles C. Allen) writes:
>> >2. Can a global module export an item which it has imported?
>> 
>>   DEFINITION MODULE m;
>>   FROM Foo IMPORT Bar;
>>   EXPORT QUALIFIED Bar,  (* is not legal*)
>>                    Feen; (* is legal *)
>>   TYPE Feen = Bar;
>>   END m.
>
>Could someone please show where this is explicitly disallowed in
>Wirth?  The second edition is unclear, and nobody around here seems to
>have the third edition (I'm rather reluctant to buy it with a
>standards committee on the loose).

PIM2-2, page 158, Chap 11, paragraph 1

"The export list specifies all identifiers of objects declared within the
module and used outside."

As import is not a declaration, an imported object may not be directly
exported.  This point has been discussed and worried over many times and
places, and, admittedly, the current resolution is less than satisfactory.

Also note that, as PIM2-3 does not provide export from a definition module,
the question becomes moot.
-- 
Randy Bush, Compiler Group, Oregon Software, Portland Oregon (503) 245-2202
uucp: ..!tektronix!oresoft!randy       Telemail: RBush     Fidonet: 1:105/6
Technical Details
Message-ID: <58@oresoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rutgers!mit-eddie!uw-beaver!tektronix!oresoft!randy
References: <13951@topaz.rutgers.edu> <57@oresoft.UUCP> <803@newton.physics.purdue.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rutgers!mit-eddie!uw-beaver!tektronix!oresoft!randy
From: randy@oresoft.UUCP (Randy Bush)
Newsgroups: comp.lang.modula2
Subject: Re: some questions about modula2
Message-ID: <58@oresoft.UUCP>
Date: Tue, 25-Aug-87 17:06:55 EDT
Article-I.D.: oresoft.58
Posted: Tue Aug 25 17:06:55 1987
Date-Received: Fri, 28-Aug-87 01:38:50 EDT
References: <13951@topaz.rutgers.edu> <57@oresoft.UUCP> <803@newton.physics.purdue.edu>
Reply-To: randy@oresoft.UUCP (Randy Bush)
Organization: Oregon Software, Portland OR
Lines: 29