Message from discussion CONTAINS problem
Received: by 10.180.84.74 with SMTP id w10mr103492wiy.4.1349754044005;
Mon, 08 Oct 2012 20:40:44 -0700 (PDT)
From: glen herrmannsfeldt <g...@ugcs.caltech.edu>
Subject: Re: CONTAINS problem
Date: Tue, 2 Oct 2012 22:19:27 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.8.2
James Van Buskirk <not_va...@comcast.net> wrote:
(snip on internal functions)
> The function can be invoked from program units other than the host
> or its sibling internal procedures in f2008, by pointing a Fortran
> procedure pointer at it or taking its C_FUNLOC and passing one of
> those or the function itself as an actual argument to another
> procedure. This can be useful because it allows a program to
> spawn different versions of the function that can have access to
> different instances of the host (for a recursive host).
> For other purposes I generally think internal procedures aren't
> all that useful, except perhaps as a substitute for statement
> functions. After all, if the function were that useful, wouldn't
> it make sense to make it another module procedure so all program
> units could have direct access to it?
Personally, I still like statement functions for very simple
operations that you might need to do in many places. An old
favorite is degree/radian conversion. I hope most compilers
now expand them inline, but maybe not all.
For things that are slightly more complicated, but still
specific to the one procedure, they are nice. Also, for small
programs that don't need any external or module functions.