Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PROCEDURE statement order question

1 view
Skip to first unread message

Tobias Burnus

unread,
Oct 28, 2007, 2:22:49 PM10/28/07
to
Hello,

is the following program valid or not:

implicit none
PROCEDURE(p1) :: p2 ! <<< valid or invalid?
PROCEDURE(sub) :: p1
contains
subroutine sub()
end subroutine
end

If I revert the two PROCEDURE lines it should be valid, but as above?

I'm sure it is somewhere stated in the standard, but I cannot find it.

And what is about the following module; I think it is valid but I
wouldn't mind if someone could confirm it.

module m
implicit none
interface bar
procedure x
end interface bar
procedure(sub) :: x
interface
subroutine sub()
end subroutine sub
end interface
end module m

Tobias

Tobias Burnus

unread,
Oct 28, 2007, 3:32:28 PM10/28/07
to
I have another PROCEDURE question; related to intrinsic procedures.

Is the following valid
IMPLICIT NONE
PROCEDURE(cos) :: p
or does one need to use
INTRINSIC cos
first?

When using intrinsics as actual arguments, the "INTRINSIC cos" seems
to be required but for PROCEDURE?

Tobias

PS: Using NAG f95 I get inconsistent/contradicting results for this
example. For the program in previous posting: NAG f95 rejects the
first example and accepts the second one.

Michael Metcalf

unread,
Oct 29, 2007, 11:34:00 AM10/29/07
to

"Tobias Burnus" <bur...@net-b.de> wrote in message
news:1193599948.4...@z9g2000hsf.googlegroups.com...

>I have another PROCEDURE question; related to intrinsic procedures.
>
> Is the following valid
> IMPLICIT NONE
> PROCEDURE(cos) :: p
> or does one need to use
> INTRINSIC cos
> first?
>
> When using intrinsics as actual arguments, the "INTRINSIC cos" seems
> to be required but for PROCEDURE?
>
> Tobias
>
Does this not answer your questions:

"C1212 (R1215) The name shall be the name of an abstract interface or of a
procedure that has an explicit interface. If name is declared by a
procedure-declaration-stmt it shall be previously declared. If name denotes
an intrinsic procedure it shall be one that is listed in 13.6 and not marked
with a bullet (.)"?

Regards,

Mike Metcalf

0 new messages