At 04:55 PM 8/19/98 +0100, Dr W.W. Schulz wrote:
>To summarize:
>
>the following compilers found no fault in the example code
>(see http://www.mailbase.ac.uk/lists/comp-fortran-90/1998-08/0009.html
>for example code):
>
>Compiler (message from)
>
>Absoft f90 (Jan van Oosterwijk)
>DEC f90/f95 (WWS)
>Fujitsu f90 (Matthijs van Waveren)
>HP f90 (Kurt W Hirchert)
>IBM xlf90 (WWS)
>NAG f90 (Ronald Sverdlove)
>NEC f90 (Len Makin)
>SGI f90 (Kurt W Hirchert)
>Sun f90 (Ronald Sverdlove)
>VAST f90 (WWS)
>
>but it failed on these:
>
>Salford FTN95 (Jan van Oosterwijk)
>Imagine1 F (WWS)
>
>Bill Long quoted a supporting passage from the F90 standard.
>
>That seems to settle the question in favour of the correctness
>of my example code. Salford and Imagine1 seem to have to check
>their compilers on this feature.
>
Werner,
Speaking for Imagine1 (but not Salford) our compiler is "correct" in the
sense that it is doing what we wanted it to do, but "incorrect" in the sense
that we wanted it to be too restrictive.
The problem is that the F90 definition of USE is so flexible. In the
following example
module one
real, public :: a,b
end module one
module two
real, public :: b
end module two
program main
use one, only : y => a
use one, only : z => a
use one
use two
...
The question is, how many ways can you refer to a? and how many to b?
Our belief is that the F90 answer to both questions is silly (or at least
surprising) and so we put in lots of restrictions on the use statement.
It looks like we have too many. It seems natural to want to overload a
function from several modules and we should have allowed this.
We'll try to fine tune the rules for the next version. Fortunately we
can relax the restriction without invalidating any existing F code.
Dick Hendrickson
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|