Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

how to call other program by compaq fortran

davidliu40
Beginner
646 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
646 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
646 Views
In Compaq Fortran, substitute DFPORT for IFPORT.
0 Kudos
davidliu40
Beginner
646 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
646 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