Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a static variable address...

Status
Not open for further replies.

ben51

Technical User
Apr 29, 2002
2
FR
I would like to get the static address of some static variables that I have in a Fortran program which is called by a c one, so that I could directly access the values in order to make a real time monitor. Presently, I'm giving the adress during the first execution of the Fortran subroutine. But I deeply think that a solution exists that could directly return those addresses during the compilation of the file. Would anybody know more about it?
Thank you very much for everybody's help.
Ben...
 
This is a bit late since you posted the question in April. Anyway, which version of Fortran are you using? You can get addresses of variables in Fortran 95 but you will probably need some assembler/vendor routine to get the address otherwise.

Does the vendor have a mixed language programming manual?
 
Just a thought: in Fortran, all the calls are by location so it would be passing the address across anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top