From: Tobias Burnus <bur...@net-b.de>
Date: Tue, 7 Feb 2012 10:30:49 -0800 (PST)
Local: Tues, Feb 7 2012 1:30 pm
Subject: Re: passing a function as an argument
On Feb 2, 12:36 am, Ken <ken.al...@sbcglobal.net> wrote:
> I've seen sample code where a function name is passed as a argument to
Yes, one passes the address of the procedure. By contrast, with
> a function or subroutine and then declared as an external function. > What is actually being passed? An address? procedure pointers, you pass the address of the pointer variable, which contains the address of the procedure. Example usage: module m
program test
Here, "p" is the passed procedure, "proc_ptr" is a pointer variable,
Note that Equivalent to using
A better choise is to use:
The other line is equivalent to the following, but I think not all
The procedure statement - and procedure pointers - are Fortran 2003
Tobias You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||