module command_line ! ! (c) Copyright 1991 to 1998 by Michael A. Beer, William D. Dorland, ! P. B. Snyder, Q. P. Liu, and Gregory W. Hammett. ALL RIGHTS RESERVED. ! use f90_unix, only: nag_iargc => iargc, getarg implicit none contains function iargc () integer :: iargc iargc = nag_iargc() end function iargc subroutine cl_getarg (k, arg, len, ierr) implicit none integer, intent (in) :: k character (*), intent (out) :: arg integer, intent (out) :: len integer, intent (out) :: ierr call getarg (k, arg) len=len_trim(arg) ierr = 0 end subroutine cl_getarg real function second () ! returns the elapsed CPU time in seconds use f90_unix, only: times, tms, clock_ticks_per_second type(tms) :: buffer real ticks ticks = times(buffer) second=ticks/clock_ticks_per_second() end function second subroutine ishell(string) ! execute the command in string in a system subshell use f90_unix_proc, only: system character*(*), intent(in) :: string call system(string) end subroutine ishell end module command_line