From j.l.schonfelder@liverpool.ac.uk  Thu Mar 30 12:06:29 2000
Received: from mailhub2.liv.ac.uk (mailhub2.liv.ac.uk [138.253.100.95])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id MAA25510
	for <SC22WG5@dkuug.dk>; Thu, 30 Mar 2000 12:06:28 +0200 (CEST)
	(envelope-from j.l.schonfelder@liverpool.ac.uk)
Received: from pcmail2.liv.ac.uk ([138.253.252.15])
	by mailhub2.liv.ac.uk with esmtp (Exim 2.12 #1)
	id 12abmw-0005me-00; Thu, 30 Mar 2000 11:02:54 +0100
Received: from [138.253.102.118] (helo=pc102118.liv.ac.uk)
	by pcmail2.liv.ac.uk with smtp (Exim 2.12 #1)
	id 12abmv-0003kf-00; Thu, 30 Mar 2000 11:02:53 +0100
From: Lawrie Schonfelder <j.l.schonfelder@liverpool.ac.uk>
Reply-To: j.l.schonfelder@liverpool.ac.uk
To: Richard Maine <maine@altair.dfrc.nasa.gov>
Cc: SC22WG5@dkuug.dk
Subject: Re: (SC22WG5.1747) Interpretation 001
In-Reply-To: <200003291659.SAA22556@dkuug.dk>
Message-ID: <SIMEON.10003301152.D@pc102118.liverpool.ac.uk>
Date: Thu, 30 Mar 2000 11:02:52 +0100 (GMT Daylight Time)
Priority: NORMAL
X-Mailer: Simeon for Win32 Version 4.1.5 Build (43)
X-Authentication: IMSP
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

I entirely agree. My words are not suitable for inclusion in the standard. I 
was not trying to write standardise. I was trying to succinctly indicate what 
I thought we should have done. 

I would be happy to have the inclusion of a name as an implied DO index 
defined as an explicit declaration of that name as an integer within the 
scope of the implied do. I would also have it independent of any declaration 
of the same name in the containing scope. As in host association within the 
implied do scope the index variable masks any variable of the same name from 
the outer scope. This would have been clean and consistent with every other 
language I know of that has nested scopes. It would be exactly similar to 
host association scoping rules.

I do not claim that this is what we defined in the flawed standardise of F90 
in this area. In fact I believe, we actually tried to define the scoping rules
so that if the name of an implied do index variable was declared in the 
containing scope it was the implied do variable and it had to be a scalar 
integer to match the needs for its use as an implied do index. I was opposed 
to this at the time because it creates the sort of mess we are now in.
 
On Wed, 29 Mar 2000 08:58:50 -0800 (PST) Richard Maine 
<maine@altair.dfrc.nasa.gov> wrote:

> Craig T. Dedo writes:
>  > > ...interpretation of things like implied do indicies is that
>  > > a. they have the scope of the implied do and
>  > > b. they are implicitly declared only in that scope not in the surrounding
>  > >    host scope.
>  > Should we include Lawries words or something close to it in the normative
>  > text of F2K?
> 
> I think I'll stay out of the technical argument on this for now (which
> is not a promisse that I'll continue to do so).  Its a tricky and
> messy issue.  Just about anything you come up with is going to look
> pretty non-intuitive in some light unless one makes major and
> incompatable revisions in what the standard says.  I think either
> answer has silly consequences and I waffle about which is sillier and
> which is more consistent with what the standard actually says.  So
> I'll probably just end up going along with the majority.  Implied DOs
> are just a mess in general.
> 
> But I think its a bit premature to work on wording for f2k until the
> technical decision is settled.  No I don't think the above words are
> ready to put into f2k exactly as is.  And since the whole question
> revolves around exact choice of wording, I'd be reluctant to commit to
> "something close to it" until I see what exact wording is proposed.
> 
> I am quite sufficiently simpleminded to be capable of misreading the
> above proposed words as follows: The words say that the variable (I'll
> invoke editorial license to change it to the singular, as is probably
> more appropriate for actual standardese) is implicitly declared in the
> scope of the implied DO.  I could interpret that as meaning that it is
> not explicitly declared and that any explicit declarations in the host
> scope have no effect.  That would disagree with the words of the
> current standard.  (And the "interesting" case is where the user
> explicitly declared the variable in order to give it a non-default kind).
> 
> I suppose its even possible that Laurie intended this interpretation.
> It is, after all, the "nothing in the host has anything to do with
> the implied DO variable" interpretation.  But I don't *THINK* this was
> what the above words were intended to mean.
> 
> If they are intended to mean what I think, then they need extra
> qualification in order to make them suitable as standardese.  Mostly
> you've got to get in the bit that they are implicitly declared only if
> there isn't an applicable explicit declaration in the host.  I'd be
> reluctant to just assume that "of course" this is what implicit
> declaration means...because there are so many things about the
> declaration of implied DO variables that are already different from
> other variables.
> 
> Yes, I'm being picky and perverse and going out of myway to see if I
> could possibly misread the words.  I think that's my job.
> 
> -- 
> Richard Maine
> maine@altair.dfrc.nasa.gov
> 

--
Lawrie Schonfelder
Director, Computing Services Dept.
The University of Liverpool, UK, L69 7ZF
Phone: 44(151)794 3716, Fax: 44(151)794 3759




