Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site ru-cs44.UUCP Path: utzoo!linus!decvax!harpo!floyd!vax135!ukc!ru-cs44!adrian From: adrian@ru-cs44.UUCP (Adrian Pell) Newsgroups: net.lang.mod2 Subject: Re: Implicit EXPORT? Message-ID: <549@ru-cs44.UUCP> Date: Thu, 13-Oct-83 17:55:45 EDT Article-I.D.: ru-cs44.549 Posted: Thu Oct 13 17:55:45 1983 Date-Received: Fri, 14-Oct-83 21:42:46 EDT References: <1051@pur-phy.UUCP> Organization: Reading Univ. UK. Lines: 37 We use the University of New South Wales M2 compiler (on Unix v7) which is derived from the original RT-11 compiler written at ETH Zurich. As far as I can see, Hal's comment is correct that 'foo' should be unknown in module user, and, indeed, our compiler bears that out producing the following output. +++++++++++++++++++++++++++++++++++++++++++ 1 MODULE user; 2 FROM B IMPORT bar, proc1; 3 4 VAR eg: bar; 5 f1: foo; (* Is this declaration valid? *) **** ^73: identifier not declared 6 (* ^ undefined identifier (* or should this be the case?*) *) 7 BEGIN 8 (* assume eg is defined *) 9 proc1(eg.fld); (* as pointed out, this is OK *) 10 f1 := eg.fld; (* this is OK, only if the declaration worked *) 11 END user. +++++++++++++++++++++++++++++++++++++++++++ This seems to be not unreasonable since the only symbol file examined whilst compiling user.mod is that generated by B, which contains only a description of bar and proc1. In particular, it only knows the size of the individual fields in bar, not their structure. Another point: our compiler enforces QUALIFIED export from definition modules as noted in the last paragraph of section 14 of the Modula-2 report. -- Adrian Pell ({vax135,mcvax,edcaad}!ukc!ru-cs44!adrian) Computer Science Dept. University of Reading UK