- #1
MRLX69
- 4
- 0
Hi All,
Just like to know if it's possible for a Fortran program to read in data on execution.
For example, in JAVA, say if I've written a program for matrix factorization, I can type in the command line:
"java mfact q" for QR factorization or "java mfact c" for Cholesky decomposition, where mfact is my compiled JAVA program.
When I run my Fortran program in command line-interface, the best I can do is run the program, then have the program to ask me for a flag, like:
So I'd have to run the program, then it asks me what I want to do. But I'd like to supply the argument as I'm executing the program. Is this possible in Fortran?
Thanks
Mike
Just like to know if it's possible for a Fortran program to read in data on execution.
For example, in JAVA, say if I've written a program for matrix factorization, I can type in the command line:
"java mfact q" for QR factorization or "java mfact c" for Cholesky decomposition, where mfact is my compiled JAVA program.
When I run my Fortran program in command line-interface, the best I can do is run the program, then have the program to ask me for a flag, like:
Code:
PRINT *, 'Please input the type of factorization you require:'
READ *, factype
So I'd have to run the program, then it asks me what I want to do. But I'd like to supply the argument as I'm executing the program. Is this possible in Fortran?
Thanks
Mike