I am currently doing a Fortran77 assignment, so please don't tell me the exact coding, but please give me a hint of what I want to do:
Using UNIX terminal, I would like to get the parameter passed on by executing
./program.exe parameter
In standard Fortran77 you can't. End of story. Accessing command line arguments with fortran programs wasn't standardized until Fortran 2003.
If you're using the GNU fortran compiler, you can use the iargc()
and getarg(i, arg)
functions, which return the number of arguments and the value of a specific argument, resepectively.