On 03/07/2012 06:12 AM, Daniel H wrote:
> is there a portable way to issue a command to the OS from a Fortran
> program? The Intel Fortran Compiler provides the command system(string)
> as an extension, but I don't find anything similar in the book by
> Metcalf/Reid/Cohen (F95/03 explained).
>
f2008 provides a standard intrinsic get_command_line for the first time.
Of the compilers I've tested, only gfortran (from 4.6) supports it.
Every compiler I've tried in recent years works with the system()
function, even though the details in principle vary among compilers
(including the question of whether it's available as a subroutine).
You could write your own get_command_line in terms of what your compiler
library provides.