Re: Bundling multiple objects into a single module?
- From: Gus Gassmann <Horand.Gassmann@xxxxxx>
- Date: 2 May 2007 06:35:40 -0700
On May 2, 10:27 am, "Michael Metcalf" <michaelmetc...@xxxxxxxxxxxxxx>
wrote:
"Gus Gassmann" <Horand.Gassm...@xxxxxx> wrote in message
news:1178111009.733808.151530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a number of fairly complicated objects. Each object is
contained in its own module, but they are very similar. All the
methods are the same, and the code is identical except for type
declarations. I have two questions concerning this: First, is there a
way to reuse the code?
Others will reply about how to peform some form of generic programming in
f95, but suffice it to point out that if the code is really common you can
keep it in one place and insert it by means of an INCLUDE line wherever it's
needed.
Second, is there a way now to
bundle the objects together in a single module, so that instead of
use object001
use object002
...
use objectnnn
I can simply say
use objects
Put all the USEs into a module called objects and use objects, just as
you've written.
Regards,
Mike Metcalf
I tried that first, but the linker gave me a raft of "unresolved
external symbol" errors. I attributed this to the compiler realizing
that the wrapper module objects does nothing and optimizing everything
away. It looks like I am barking up the wrong tree, but I don't know
where else to start.
.
- Follow-Ups:
- Re: Bundling multiple objects into a single module?
- From: Richard Maine
- Re: Bundling multiple objects into a single module?
- From: highegg
- Re: Bundling multiple objects into a single module?
- From: Michael Metcalf
- Re: Bundling multiple objects into a single module?
- References:
- Bundling multiple objects into a single module?
- From: Gus Gassmann
- Re: Bundling multiple objects into a single module?
- From: Michael Metcalf
- Bundling multiple objects into a single module?
- Prev by Date: Re: I/O in PURE and ELEMENTAL procedures in Fortran 2008
- Next by Date: [CFP] EuroPVM/MPI'07 -- submission deadline extended to May 14th
- Previous by thread: Re: Bundling multiple objects into a single module?
- Next by thread: Re: Bundling multiple objects into a single module?
- Index(es):
Relevant Pages
|