Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29386 Discussions

how to call other program by compaq fortran

davidliu40
Beginner
898 Views
Dear Friends:

I compile some program by MatLab. Now I have to use fortran to call the program edited by Matlab. Could you tell me how to do it?

Thank you very much.

David
0 Kudos
4 Replies
ingo_berg
Beginner
898 Views
Use the system command from the ifport module.

subroutine CreateTecMacro_(a_sDataFile, a_Table)

use ifport

! Create your command string
! ....
! ....

call system(sCmd)

end subroutine

Doing it that way you have no chance to communicate with your program so it mus support a batch mode.

Ingo
0 Kudos
Steven_L_Intel1
Employee
898 Views
In Compaq Fortran, substitute DFPORT for IFPORT.
0 Kudos
davidliu40
Beginner
898 Views
Thank you very much. I tried to find IFPORT or DFPORT in Compaq Fortran Mannual, but I cann't. Could you tell where I find such internal variable definition and application?

Thank you again.
0 Kudos
Steven_L_Intel1
Employee
898 Views
It's not a variable - it's a module. You add the line:

use dfport

to your program immediately after the PROGRAM, SUBROUTINE or FUNCTION statement. That makes the definition of the SYSTEM routine available to you. Look up SYSTEM in the on-disk documentation index.
0 Kudos
Reply