Re: Fortran 2003: abstract interfaces
- From: Tobias Burnus <burnus@xxxxxxxx>
- Date: Thu, 31 Jan 2008 06:52:17 -0800 (PST)
On Jan 31, 2:54 pm, Arjen Markus <arjen.mar...@xxxxxxxxxx> wrote:
abstract interface
subroutine dothis( ... )
end subroutine
end interface
This abstract interface is part of a typ definition.
How do I specify that a particular routine implements the interface
"dothis"?
Is that via the procedure statement:
procedure(dothis) :: do_it_this_way
This works.
Or via:
interface dothis
module procedure do_it_this_way
end interface
Or how?
This does not work since (a) do_it_this_way is not a module procedure
and "interface dothis" clashes with "subroutine dothis" in the
abstract interface.
By the way: NAG f95, gfortran and g95 correctly accept the first
version and reject the second version. Thus to find out whether (a) or
(b) is valid, one can simply try it out and see what a compiler
accepts or rejects. If several compilers behave identically (which
support a given feature), it is a good indication that their
diagnostic is right.
Tobias
.
- Follow-Ups:
- Re: Fortran 2003: abstract interfaces
- From: Richard Maine
- Re: Fortran 2003: abstract interfaces
- From: Arjen Markus
- Re: Fortran 2003: abstract interfaces
- References:
- Fortran 2003: abstract interfaces
- From: Arjen Markus
- Fortran 2003: abstract interfaces
- Prev by Date: Re: passing a variable number of args/vectors to a routine
- Next by Date: Re: Automatically transform or expand do loop in a subroutine
- Previous by thread: Fortran 2003: abstract interfaces
- Next by thread: Re: Fortran 2003: abstract interfaces
- Index(es):
Relevant Pages
|