From jls@uxb.liv.ac.uk Wed Jun  2 16:03:27 1993
Received: from mail.liv.ac.uk by dkuug.dk with SMTP id AA10979
  (5.65c8/IDA-1.4.4j for <SC22WG5@dkuug.dk>); Wed, 2 Jun 1993 16:03:27 +0200
Received: from 138.253.31.132 by mailhub.liverpool.ac.uk with SMTP (PP) 
          id <04681-0@mailhub.liverpool.ac.uk>; Wed, 2 Jun 1993 15:02:47 +0100
From: jls <jls@uxb.liv.ac.uk>
Message-Id: <8987.9306021358@uxb.liv.ac.uk>
Subject: EXTERNAL statements in modules
To: SC22WG5@dkuug.dk (SC22/WG5 members)
Date: Wed, 2 Jun 93 14:58:38 BST
Cc: F90@uxb.liv.ac.uk
X-Mailer: ELM [version 2.3 PL11]
X-Charset: ASCII
X-Char-Esc: 29

Some of the recent email on this subject has prompted me to
reflect that we appear to have allowed EXTERNAL statements in modules
as something of an oversight.
It was my view that when we were establishing the rules of USE association
our intent was that anything declared in a module was totally specified there
and that no specification was to be allowed in a USEing program unit.
I certainly did not think about what this meant for EXTERNAL, largely 
because I would not have thought of using EXTERNAL but thought in
terms of complete interface block declarations.
However, since it appears that we are disallowing both an EXTERNAL
statement and an interface block declaration for a procedure, we cannot 
have a complete specification for a procedure declared in an EXTERNAL 
statement in a module. We have no way of specifying the charactreistics of
the arguments of the procedure. The question I would like to ask
formally is, is the following fragment standard conforming and if so was this
allowed deliberately or by accident?
MODULE M
EXTERNAL F
ENDMODULE M

PROGRAM MAIN
USE M
INTEGER I
CHARACTER F,C
...
C = F(I)
...

It could be said that the module implicitly declares F to be real, but this
wont work since at that stage it is not even known that F is a function, it
could just as well be a subroutine and hence have no implied type.

I believe this anomoly was allowed by mistake and that we should fix it
by disallowing EXTERNAL statements in a module.
this could be done by a simple edit 157/21 before "or a" add
" an EXTERNAL statement,"


-- 
Dr.J.L.Schonfelder
Director, Computing Services Dept.
University of Liverpool, UK
Phone: +44(51)794 3716
FAX  : +44(51)794 3759
email: jls@liv.ac.uk   

