OpenVMS (VAX ) FORTRAN 子例程可以传递:character*(*)
subroutine forsub (in)
character*(*) in
type *, in
return
end
来自 C 函数:
#include<stdio.h>
#include <descrip.h>
extern void forsub();
main()
{
auto $DESCRIPTOR(in_string, "VMS pass from c to fortran.");
forsub(&in_string);
}
返回a的 OpenVMS (VAX) FORTRAN 函数如何character*(*)
:
character*(*) function forfunc (in)
character*(*) in
forfunc = in
return
end
在 C 代码中处理:
#include<stdio.h>
#include <descrip.h>
extern ?????? forfunc();
main()
{
auto $DESCRIPTOR(in_string, "VMS fortran function return to c.");
??????? = forfunc(&in_string);
}
- OpenVMS V6.2
- 数字 Fortran 77 V6.5-188
- DEC C V6.0-001