Wah Wah's Most Frequent Fortran Fallacy : how to call other program by compaq fortran
From: Gerald F. Thomas (gfthomas_at_sympatico.ca)
Date: 03/30/05
- Next message: glockner: "'bug' with Intel FORTRAN for Linux"
- Previous message: J. F. Cornwall: "Re: 1607: Unable to install InstallShield Scripting Runtime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Mar 2005 01:30:37 -0500
*********Begin Prattle
>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?
-- >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. -- >In Compaq Fortran, substitute DFPORT for IFPORT. -- >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? -- >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. *******Enough Prattle The OP and ~500 others have been short-changed: add m-scripts to a CVF project, the Matlab compiler together with the installed C/C++ compiler will convert them to c/cpp code which you invoke (in-process, out-of-process 'system' be damned) in the usual way whether from C/C++ or Fortran. -- You're Welcome, Gerry T. ______ "The most successful tyranny is not the one that uses force to assure uniformity but the one that removes the awareness of other possibilities, that makes it seem inconceivable that other ways are viable, that removes the sense that there is an outside." -- Allan Bloom, in The Closing of the American Mind.
- Next message: glockner: "'bug' with Intel FORTRAN for Linux"
- Previous message: J. F. Cornwall: "Re: 1607: Unable to install InstallShield Scripting Runtime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]