From owner-sc22wg5@dkuug.dk  Wed Jun 18 15:26:27 2003
Received: (from majordom@localhost)
	by dkuug.dk (8.12.8p1/8.9.2) id h5IDQRZQ014307
	for sc22wg5-domo; Wed, 18 Jun 2003 15:26:27 +0200 (CEST)
	(envelope-from owner-sc22wg5@dkuug.dk)
X-Authentication-Warning: ptah.dkuug.dk: majordom set sender to owner-sc22wg5@dkuug.dk using -f
Received: from inf.rl.ac.uk (nfs7.inf.rl.ac.uk [130.246.72.7])
	by dkuug.dk (8.12.8p1/8.9.2) with ESMTP id h5IDQLEc014302
	for <sc22wg5@dkuug.dk>; Wed, 18 Jun 2003 15:26:23 +0200 (CEST)
	(envelope-from j.k.reid@rl.ac.uk)
Received: from numerical.cc.rl.ac.uk (numerical [130.246.8.23])
	by inf.rl.ac.uk (8.11.6+Sun/8.8.8) with ESMTP id h5IDOSD21871
	for <sc22wg5@dkuug.dk>; Wed, 18 Jun 2003 14:24:28 +0100 (BST)
Received: from rl.ac.uk (jkr.cse.rl.ac.uk [130.246.9.202])
	by numerical.cc.rl.ac.uk (8.8.8+Sun/8.8.8) with ESMTP id OAA27007
	for <sc22wg5@dkuug.dk>; Wed, 18 Jun 2003 14:35:07 +0100 (BST)
Message-ID: <3EF0697E.2050705@rl.ac.uk>
Date: Wed, 18 Jun 2003 14:30:38 +0100
From: John Reid <j.k.reid@rl.ac.uk>
Reply-To: j.k.reid@rl.ac.uk
Organization: Rutherford Appleton Laboratory
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: sc22wg5@dkuug.dk
Subject: Re: (SC22WG5.2773) Modules TR
References: <200306180116.h5I1GmdL011630@dkuug.dk> <200306180937.h5I9beL8013363@dkuug.dk>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@dkuug.dk
Precedence: bulk

WG5,
> 
> As a more graphic example of what the effect of trying to use the rules 
> of host association between module an submodule than the one in my 
> previously distributed paper. I believe the rules of host association as 
> they stand and are included in 03-123 would allow the following to compile.
> 
> MODULE DAD
> TYPE modstruct
> REAL::a(10)
> ENDTYPE modstuct
> 
> FORWARD INTERFACE
> FUNCTION modfun(x)
>  type(modstruct)::x
>  REAL::modfun
> ENDFUNCTION modfun
> ENDINTERFACE
> ENDMODULE DAD
> 
> SUBMODULE (DAD) SON
> TYPE modstruct       ! under host association rules this declaration is 
>                      ! permitted
>  CHARACTER::ch       ! and it creates a new type called modstruct local 
>                      ! to the
> ENDTYPE modstruct    ! submodule and makes the module declared type 
>                      ! inaccessible
> INTEGER:: n
> 
> IMPLEMENTATION modfun
> FUNCTION modfun(x)
>  type(modstruct)::x
>  REAL::modfun
>  !........
>  n=<some-expression>
>  !........
> ENDFUNCTION modfun
> ENDIMPLEMENTATION modfun
> ENDSUBMODULE SON

No. It is excluded by lines 16-19 of page 9 of J3/03-123.

But this example does illustrate a feature that Lawrie wants: to be able 
to redeclare parent entities as an aid to documentation and maintenance. 
  It might be argued that we are being inconsistent in allowing such 
redeclaration for the procedure interface but not for other things, but 
we already have redeclaration for interfaces in Fortran 95. We do not 
have redeclaration of entities accessed from a module; J3/03-123 is 
being consistent with this.

Cheers,

John.

