Re: Structure of large link libraries in f95
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Fri, 31 Mar 2006 10:14:34 -0800
Charles Russell <SPAMworFREEwor@xxxxxxxxxxxxx> wrote:
Is it possible to create a module from a set of library routines by
simply INCLUDEing f77 files, so as not to muck up the originals? The
following try hangs up on the gfortran requirement for "END SUBROUTINE"
where f77 has simply END.
Nope. Not strictly, at least not now. The "end subroutine" thing is
simple to fix, even automatically, but you do have to fix it, so if
touching the source at all is a no-no, or if keeping it f77-compatible
is required, then no.
There's a proposal to allow the subroutine keyword to be optional in
order to facilitate this kind of thing, but that's not even in f2003,
but the next standard after that (and thus it is still just a proposal,
though I think that one is a "shoo-in"). So that will be quite a while.
Well, I'd lay decent odds that some compilers will allow that form as an
extension before then, but quite a while until it is standardized.
You do have one other option to create a module from f77 routines. It
isn'y my favorite option in general, but it does work and there are
cases where it is the best option.
There are ways to "ease into" f90 stuff. You don't actually have to do
it as an all-or-nothing thing. That includes module issues.
Specifically...
Compile your code and put it in a library the same way you do now. Then
make a module with nothing but interface blocks. I think there are some
tools to help in automatically reading the source and making appropriate
interface blocks. I couldn't point you to those tools off the top of my
head, as I haven't had enough need to go looking, but some of the rules
for interface bodies have no other purpose but to make such tools easier
to do, so I assume someone must have done such tools. ??
You end up being able to use both the f77 ways and the newfangled module
ways of accessing the procedures.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: Structure of large link libraries in f95
- From: Dan Nagle
- Re: Structure of large link libraries in f95
- From: Charles Russell
- Re: Structure of large link libraries in f95
- References:
- Structure of large link libraries in f95
- From: Charles Russell
- Re: Structure of large link libraries in f95
- From: robert . corbett
- Re: Structure of large link libraries in f95
- From: Charles Russell
- Re: Structure of large link libraries in f95
- From: Walter Spector
- Re: Structure of large link libraries in f95
- From: Charles Russell
- Structure of large link libraries in f95
- Prev by Date: Re: Structure of large link libraries in f95
- Next by Date: Re: fortran code for 'cp' / subroutine file_copy
- Previous by thread: Re: Structure of large link libraries in f95
- Next by thread: Re: Structure of large link libraries in f95
- Index(es):
Relevant Pages
|