Fortran Run External File.exe Through Fortran 90 - Answered

  • Thread starter Thread starter andredoc
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
To run an external executable file in Fortran 90, the `call system("commandline")` function can be utilized. This allows the Fortran program to execute a command line instruction, effectively running the external file. While this method is generally supported, its availability may vary depending on the specific compiler used. For capturing output from the external program, it is recommended to redirect the output to a file and then read that file within the Fortran code. The discussion confirms that using the `call system` command successfully resolved the issue for the user.
andredoc
Messages
5
Reaction score
0
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.

Thanks

Best regards

André
 
Technology news on Phys.org
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:
Mgb_phys, with the call system comand my program is working, thanks!
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

Similar threads

Replies
8
Views
4K
Replies
4
Views
2K
Replies
5
Views
5K
Replies
8
Views
4K
Replies
8
Views
2K
Replies
3
Views
4K
Back
Top