Another option you might want to consider is to dynamically load the user's
code at runtime. From a coding point of view all you would need to know is
the name of the users routine. This does require OS support however and
complicates life slightly for the user as they must compile their code as a
shareable object.
Glenn
At 5:12 pm +0100 13/6/00, Phillip Helbig wrote:
>> I am working on a library module (A), which makes uses of an
>> user supplied procedure (P) which, preferably, is placed in
>> another module (B). In particular, it should be possible to
>> compile A without knowing the body of B. However, a rudimental
>> version of B containing a dummy for P could be supplied.
>>
>> Is there a legal way to do this in Fortran 95?
>> If not, what is the "textbook solution" for this problem?
>
>I don't think so. I have struggled with this quite a bit, and never got
>a satisfactory solution from this or any other source.
>
>Someone will probably mention Van's separation of interface and
>implementation. Were that adopted, it would solve my problems.
>
>Some sort of rudimentary version of B containing a dummy for P might
>WORK, but it is not standard. The USEd modules have to be available
>when the routine using them is compiled.
>
>As it turns out, I will be returning to this problem soon, hopefully
>this week. You'll probably hear cries of desperation from me then!
--
Dr. Glenn Carver, Senior Research Associate,
Centre for Atmospheric Science, Chemistry Dept., Cambridge University, UK
mailto:[log in to unmask] http://www.atm.ch.cam.ac.uk/~glenn/
"I never think of the future, it comes soon enough"
- Albert Einstein
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|