在Fortran 77中打印变量的地址

3
我该如何在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);

谢谢!

1个回答

2

谢谢!我其实知道 loc 函数,但只在 Cray 指针的上下文中看到过它,并不知道如何使用它来打印地址。你提到的页面有一个有用的示例。 - Amittai Aviram

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接