How to use command line arguments in Fortran?
If you want to get the arguments fed to your program on the command line, use the (since Fortran 2003) standard intrinsic subroutine GET_COMMAND_ARGUMENT. Something like this might work PROGRAM MAIN REAL(8) :: A,B integer :: num_args, ix character(len=12), dimension(:), allocatable :: args num_args = command_argument_count() allocate(args(num_args)) ! I’ve omitted checking the return status of … Read more