Can i run a fortran program from mathematica, please?
replied to: JohnCogill
Replied to: Can i run a fortran program from mathematica, please?
Run[expr1, expr2, expr3]
or
!expr
might be what you are looking for.
For example
Run[ls]
or
!ls
creates a shell, invokes ls, that displays the directory contents, exits and then the shell exits.
Read about Run in the help system.
For more complicated situations, where you want bidirectional communication between the MMA kernel and your executable you will need to learn how to create a MathLink executable and that is considerably more difficult
replied to: JohnCogill
Replied to: Can i run a fortran program from mathematica, please?
Thank you.
I attempt to run the example given under Help ref/Run
It works until I reach the output. Then I receive the following.
FilePrint[ToFileName[$TemporaryPrefix, ToString[temp1]]]
I receive
General::noopen: Cannot open C:\Documents and Settings\johnc\Local Settings\Temp\m\temp1. >>
Any help is gratefully received
JohnCogill