Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-phy.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxi!houxm!ihnp4!inuxc!pur-ee!CSvax:Pucc-H:Physics:hal From: CSvax:Pucc-H:Physics:hal@pur-ee.UUCP Newsgroups: net.lang.mod2 Subject: Implicit EXPORT? Message-ID: <1051@pur-phy.UUCP> Date: Tue, 11-Oct-83 13:48:21 EDT Article-I.D.: pur-phy.1051 Posted: Tue Oct 11 13:48:21 1983 Date-Received: Thu, 13-Oct-83 07:15:23 EDT Organization: Purdue University Physics Dept. Lines: 52 This was meant as a followup to Pat Clancy's comments in net.lang but the followup command posted the response as a separate article. Therefore I'm posting it here (actually it's more appropriate for this newsgroup anyhow). The question concerned the implicit export of record field types. ----------- You misunderstood the question I was asking. Given: DEFINITION MODULE A; EXPORT foo; TYPE foo=(whatever,...); END A. and DEFINITION MODULE B; FROM A IMPORT foo; EXPORT bar, proc1; TYPE bar = RECORD fld: foo: ... END; PROCEDURE proc1; ... END B. Then, MODULE user; FROM B IMPORT bar, proc1; VAR eg: bar; f1: foo; (* Is this declaration valid? *) (* ^ undefined identifier (* or should this be the case?*) *) BEGIN (* assume eg is defined *) proc1(eg.fld); (* as pointed out, this is OK *) f1 := eg.fld; (* this is OK, only if the declaration worked *) END user. --------- The Modula-2 report specifies that the name "fld" is exported with "bar" but does not mention what the status of "foo" is. A strict interpretation would require that "foo" be unknown in the module "user". Of course, the compiler knows about "foo", that's not the question. How, do current implementations handle this. Hal Chambers Physcis Dept. Purdue University (...!pur-ee!pur-phy!hal)