Vertical scroll bar

You could have posted your latest “results” here instead of opening a new thread (Execute_command_line - #5 by Patrick). As stated by our community guidelines:

Make the effort to put things in the right place, so that we can spend more time discussing and less cleaning up. So:

  • […]
  • Don’t cross-post the same thing in multiple topics.

Concerning your program – calling a program via execute_command_line may appear like the simpler solution, but is prone to fail if the executable is not in the path or for any other arcane reason. Linking the routine directly into your executable would be preferable.

As I’ve suggested before, you can begin to study Fortran with the freely available chapters on Modern Fortran from Manning: Exploring Modern Fortran Basics. In case helpful, you can consider buying the full book (Modern Fortran), which also contains a chapter on interoperability with C.

Both @mecej4 and @Nocaster60 have also given good advice.

1 Like