Re: ENTRY statement
- From: GaryScott <garylscott@xxxxxxxxxxxxx>
- Date: Fri, 12 Jun 2009 15:05:04 -0700 (PDT)
On Jun 12, 4:28 pm, Ron Shepard <ron-shep...@xxxxxxxxxxxxxxxxxx>
wrote:
In article
<7eafd80b-e2af-4f3e-a635-7555c1e53...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
GaryScott <garylsc...@xxxxxxxxxxxxx> wrote:
I use it only to define alias' for the procedure name. Some like long
descriptive names and some like short(er) names. Also, I sometimes
produce libraries that contain a Fortran77 style alias (for example I
might want to provide a ready replacement some 3rd party library
procedure). I hope for a standard way to create procedure name alias'
similarly if ENTRY is ever deleted.
Would the normal renaming facility of module subroutines serve this
purpose just as well?
USE some_module, f => long_subroutine_or_function_name
If you had a large number of these long names, then you could write a
module whose only purpose was to make these short definitions, and then
you could use that new module everywhere you needed one of the short
names.
Or, another possibility would be to define interfaces with short names
to subprograms with long names. For an external procedure you could use
interface f
subroutine long_external_subroutine_name(a,b,c)
...declarations here...
end subroutine long_external_subroutine_name
end interface
or for a module procedure you could use
interface f
module procedure long_module_subroutine_name
end interface
These all have some advantages and disadvantages compared to entry
points, of course, but the ability to define these kinds of aliases
already exists in the language, no need to wait for ENTRY to be deleted
in order to use them.
For procedures to be used by Fortran 90 and higher compilers these
might suffice. But I am also producing libraries for Fortran 77
compilers and need the short procedure name to be available in the
compiled object as an entry point. Of course there are other language
extensions required to make some things work (stdcall vs cdecl, etc.).
$.02 -Ron Shepard
.
- References:
- ENTRY statement
- From: Thomas Robitaille
- Re: ENTRY statement
- From: Ron Shepard
- Re: ENTRY statement
- From: robin
- Re: ENTRY statement
- From: Ron Shepard
- Re: ENTRY statement
- From: Tim Prince
- Re: ENTRY statement
- From: Ron Shepard
- Re: ENTRY statement
- From: *** Hendrickson
- Re: ENTRY statement
- From: GaryScott
- Re: ENTRY statement
- From: Ron Shepard
- ENTRY statement
- Prev by Date: Re: Fortran Do Loop Exceeding its Index Limit?
- Next by Date: Re: declaring module functions in the module itself
- Previous by thread: Re: ENTRY statement
- Next by thread: Re: ENTRY statement
- Index(es):