Anyone still program in Fortran?

scootermaster

Platinum Member
Nov 29, 2005
2,411
0
0
I have a really stupid question...one that could easily be done in C (god I hate Fortran). I simply want to print out the run-time address of an array reference.

So if I have an array a(10:10), I'd have some statement or function or something that just prints out what the base address of a is. Sorta like printf("%p", a) in C.

Simple enough, eh? Any thoughts?

Thanks!
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
I do fortran programming, but I'm a physicist, so I don't really have to do much stuff like that. Most of the stuff I do is scientific-related so I can't really help you.
 
Oct 9, 1999
15,216
3
81
god its been years since i programmed in fortran.. my dad does stuff in fortran and i look over his code all the time.
But dont ask me to propgram.. in anycase i dont have f77 access with me.
 

Cooler

Diamond Member
Mar 31, 2005
3,835
0
0
Originally posted by: scootermaster
I have a really stupid question...one that could easily be done in C (god I hate Fortran). I simply want to print out the run-time address of an array reference.

So if I have an array a(10:10), I'd have some statement or function or something that just prints out what the base address of a is. Sorta like printf("%p", a) in C.

Simple enough, eh? Any thoughts?

Thanks!

why not c ?
There are fortran to C convter programs.
 

Heisenberg

Lifer
Dec 21, 2001
10,621
1
0
Originally posted by: silverpig
I do fortran programming, but I'm a physicist, so I don't really have to do much stuff like that. Most of the stuff I do is scientific-related so I can't really help you.

Yeah, we don't really care where what is in memory, we just want the damn thing to work.
 

scootermaster

Platinum Member
Nov 29, 2005
2,411
0
0
Originally posted by: Cooler
Originally posted by: scootermaster
I have a really stupid question...one that could easily be done in C (god I hate Fortran). I simply want to print out the run-time address of an array reference.

So if I have an array a(10:10), I'd have some statement or function or something that just prints out what the base address of a is. Sorta like printf("%p", a) in C.

Simple enough, eh? Any thoughts?

Thanks!

why not c ?
There are fortran to C convter programs.


The program that I need this information in is in Fortran. It's a big matrix multiplication program. More likely, I guess I could write printf("%p", array_base) in C, and convert it to Fortran, but I doubt it'd work. Hmmm...
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
LAst time I did Fortran was back in 88.

We used to look at the memory map printouts from the linker and work on address schemes from there to manually overlay code sections.. There was some API provided by the OS that allowed us to do so.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
The most fortran programming I do now is writing a C wrapper for it :D
In any case, I don't think I ever got that far down in the weeds with fortran.