Hello, I am trying to pass a global variable from a DLL to a Main executable. I am converting hundreds of Fortran 77 subroutines(in a huge static library), hundreds of include files with common statements, and hundreds of Main executables that use the values populated in the static library via common statements.
After converting, the static library to a dynamic library(some .net calls) I see that the values from the common statements are not saving to the main executable.
As such, I decided to write a small sample app doing so, but it does not work either. So I'm trying now with a module with no success either.
What am I missing?
PROGRAM GlobalExe
use GlobalModule
Implicit None
CALL global_set_value()
print *, 'value=',global_id
END PROGRAM
I have the following test Subroutine in a DLL
SUBROUTINE global_set_value ()
use GlobalModule
IMPLICIT NONE
global_id = 'Global Val'
RETURN
END SUBROUTINE global_set_value
I have the following test Module:
module GLOBALMODULE
implicit none
!Global variable(s)
character*10,save :: global_id
end module