Re: SAVE of COMMON variables
- From: feenberg@xxxxxxxxx
- Date: 5 Apr 2006 04:49:44 -0700
Brian Elmegaard wrote:
Hi
I compiled a fortran program into a dll with gcc.
In the program several variables are stored in COMMON's. I would like
to have these SAVE'd between calls to the dll, but gcc will not let me
compile something like:
program comsave
integer a
common /b/ a
save a
a = 10
end
Is it not allowed/possible?
http://www.rugbyklubben-speed.dk
I don't think this is really a fortran issue. In fortran 77 all common
blocks are statically allocated, and values are saved across calls to
subroutines. Otherwise how would block data work? However, you are
asking if common storage is reset when the main program is rerun. I
expect it would be, but I am unfamiliar with the behavior of Windows
DLLs. Have you tried it out? I would be very skeptical of any fortran
based solution to this problem, as an apparent solution might depend
on the DLL not moving between invocations (does that happen)?
I think you are supposed to use the registry or the file system for
things like this.
Daniel Feenberg
feenberg isat nber dotte org
.
- Follow-Ups:
- Re: SAVE of COMMON variables
- From: Craig Powers
- Re: SAVE of COMMON variables
- From: Gordon Sande
- Re: SAVE of COMMON variables
- From: Jan Vorbrüggen
- Re: SAVE of COMMON variables
- References:
- SAVE of COMMON variables
- From: Brian Elmegaard
- SAVE of COMMON variables
- Prev by Date: Re: SAVE of COMMON variables
- Next by Date: Re: SAVE of COMMON variables
- Previous by thread: Re: SAVE of COMMON variables
- Next by thread: Re: SAVE of COMMON variables
- Index(es):
Relevant Pages
|