PING: Re: [Fortran, Patch] Proposed type-bound procedures patch, part 1
Tobias Burnus
burnus@net-b.de
Fri Aug 22 16:19:00 GMT 2008
Hi Daniel,
I start reviewing by testing the patch rather than starting by reading
through the patch; thus here come the first parser comments:
----------------------------------------
procedure() :: foo
interface
subroutine two
end subroutine two
end interface
abstract interface
subroutine three
end subroutine three
end interface
type t
contains
procedure,nopass :: two ! OK - valid: external proc. mit expl. interface
procedure,nopass :: three ! Invalid: no external proc.
procedure,nopass :: bar ! Invalid no module or external proc.
procedure,nopass :: foo ! Invalid no explicit interface
! ^--- rejected, but with misleading error message ("no procedure")
end type t
contains
subroutine bar()
end subroutine bar
end
----------------------------------------
With the following, I presumably hit unimplemented stuff but I dislike
the error message, which is somewhat misleading:
"Error: Expected binding name"
---------------------------------------
module m
implicit none
interface
subroutine bar()
end subroutine bar
end interface
type :: t
contains
procedure(bar) :: foo ! Invalid since not DEFERRED
procedure(bar), DEFERRED :: one ! Invalid since not an abstract type
procedure(bar), DEFERRED :: one => four ! interface + '=>' = invalid
end module m
---------------------------------------
Tobias
More information about the Fortran
mailing list