如何在Fortran 77中打印变量的地址?例如:
subroutine foo
integer d3
c Now I want to print "Address of d3: " followed by its address.
当然,C中的等价物是
int d3;
printf("Address of d3: %p\n", &d3);
谢谢!
答案 0 :(得分:2)
虽然技术上不是Fortran 77,但大多数fortran编译器提供了一个LOC函数来获取变量的地址。