Re: procedure argument
- From: Joe Krahn <krahn-at-niehs.nih.gov@xxxxx>
- Date: Thu, 30 Mar 2006 14:06:13 -0500
Roland Schmehl wrote:
a question regarding the usage of procedure arguments with different....snip
argument lists.
the appended code compiles and writes out:
sub1: a= 1.0
sub2: a= 1.0 , b= 2.0
when i replace the two "EXTERNAL sub" statements by interface blocks
INTERFACE
SUBROUTINE sub (a,b)
REAL :: a,b
END SUBROUTINE sub
END INTERFACE
the compiler complains (as it should) about the different number of arguments of actual and dummy procedure.
why does it accept the EXTERNAL statements?
thanks,
roland
Before F90, no procedure prototypes existed, but you could still pass an external procedure as an argument. EXTERNAL comes from pre-F90. The current method of procedure "pointer" passing is still somewhat incomplete. In F2003, you will be able to explicitly declare a procedure pointer and it's argument prototype.
Joe
.
- References:
- procedure argument
- From: Roland Schmehl
- procedure argument
- Prev by Date: Re: Help: IFC stack overflow
- Next by Date: Re: Help: IFC stack overflow
- Previous by thread: procedure argument
- Next by thread: Re: procedure argument
- Index(es):
Relevant Pages
|