From jkr@jkr.cc.rl.ac.uk  Wed Mar 29 13:50:09 2000
Received: from nameserv.rl.ac.uk (nameserv.rl.ac.uk [130.246.135.129])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id NAA20934
	for <SC22WG5@dkuug.dk>; Wed, 29 Mar 2000 13:50:05 +0200 (CEST)
	(envelope-from jkr@jkr.cc.rl.ac.uk)
Received: from jkr.cc.rl.ac.uk (jkr.cc.rl.ac.uk [130.246.8.20])
	by nameserv.rl.ac.uk (8.8.8/8.8.8) with ESMTP id MAA03616
	for <SC22WG5@dkuug.dk>; Wed, 29 Mar 2000 12:50:03 +0100
Received: (from jkr@localhost)
	by jkr.cc.rl.ac.uk (8.8.8+Sun/8.8.8) id MAA13302
	for SC22WG5@dkuug.dk; Wed, 29 Mar 2000 12:51:09 +0100 (BST)
Date: Wed, 29 Mar 2000 12:51:09 +0100 (BST)
From: John Reid <J.Reid@letterbox.rl.ac.uk>
Message-Id: <200003291151.MAA13302@jkr.cc.rl.ac.uk>
To: SC22WG5@dkuug.dk
Subject: Re: (SC22WG5.1736) Interpretation 001
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

Steve,
      Good to hear from you. I hoping to get work started on the
interpretations by email. 

> 
> I've looked at 001 and (not surprisingly) agree with 
> Henry's analysis.
> 
> However, I tried the following code on 4 compilers 
> (Salford, NAS, Sun's F90 and NAG's F90) and they all assume 
> that the variable j in the implied DO creates the variable 
> j. Each gives an error message for the  
> INTEGER::j statement indicating that j has already been 
> defined in the scope i.e. it has been exported from the 
> module.
> 
> Module mod1
> 
> INTEGER :: A(10)=(/(j,j=1,10)/)
> 
> End Module mod1
> 
> Program prog1
> 
> USE mod1
> INTEGER :: j
> 
> PRINT *, "j = ",j
> 
> End Program
> 
> The text in 14.1.3 should be enough to indicate that j IS 
> NOT visible outside its containing statement but clearly at 
> least 4 compiler vendors seem to have mis-interpreted 
> the standard (IMHO). [From the email discussions it seems 
> that at least 6 other Fortran experts agree (Adams, Dedo, 
> Zongarro,Bleikamp, Schonfelder,Oglesby)]
> 
> Although I don't think it should be necessary, the above 
> makes me think that it may be desirable to include/modify 
> some text in the standard to make the scoping rules more 
> explicit.
> 


IMHO, the situtation is:

Get it wrong: Nag, Salford, NAS, Fujitsu, SUN

Get it right: Epc, DEC, IBM

I stand by my position that the standard is unambiguous and does not
need an edit. Please bear in mind how clumsy the corrigendum procedure
is.  Making a change to the Fortran 2000 draft or even adding an
example is quite another matter. How about an extra sentence in the
ANSWER part to this effect?

Best wishes,

John. 
