Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Question - Fortran

  1. Oct 29, 2008 #1
    Hi! I'm a MSc student and for the development of my dissertation I need to implement a simple fortran 90 program. I'm aware of the basic features of this language but I can't seem to find how to run an executable file (an external file) through fortran. My question is, how can I make the fortran code to run an external "file.exe"?

    It's a basic question, but I haven't found an answer so far.


    Best regards

  2. jcsd
  3. Oct 29, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    Something like:
    call system("commandline")

    ps. Haven't used this myself recently - don't know if it is standard in all compilers.
    I also haven;t used it to read data back from the system call - you might be better writing the output of the call to a file and readign the file from fortran.
    Last edited: Oct 29, 2008
  4. Oct 31, 2008 #3
    Mgb_phys, with the call system comand my program is working, thanks!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook