This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran feature request: internal procedures as actual arguments


On Sun, Jul 29, 2007 at 07:00:19PM -0700, Bill Paxton wrote:
> 
> This is a plea for gfortran to support internal procedures as actual  
> arguments.

I  could be wrong, but this is prohibited by at least the Fortran 
2003 standard.  On page 256, one finds "the internal procedure name
shall not be argument associated with a dummy procedure (12.4.1.3)"
The "shall not" is a fairly strong statement within the standard.

It also (imho) violates the very definition of an internal procedure
given Sec. 2.2.3.3.

Not to mention, among other things, host association probably becomes
a tangled nightmare.

> I hope it makes it onto your TO-DO list.  I need it yesterday!


If you need threads, I'd suggest you take a look at Dan Nagle's
pthread module at http://users.erols.com/dnagle/pub/pthread.f03
instead of cramming a (possibly) nonstandard feature into gfortran.


Hmmm, before I hit send, Ii decided to checked the F95 standard.
See 12.4 on page 198.

Constraint: A procedure-name actual-arg shall not be the name of an
            internal procedure or of a statement function and shall
            not be the generic name of a procedure unless it is also a
            specific name (12.3.2.1, 13.1).

This is a violation of the standard, and I think gfortran should not
include the feature you request.  Of course, if someone wants to 
implement the feature and contribute the code, then I won't oppose it.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]