Command line argument in fortarn 77

  • Thread starter Thread starter Manojg
  • Start date Start date
  • Tags Tags
    Argument Line
AI Thread Summary
In FORTRAN 77, command line arguments can be passed using the `getarg` subroutine, similar to how it's done in C/C++. Specifically, the Intel Fortran compiler allows the use of `call getarg(1, buffer)` to retrieve the first command line argument into a buffer. This buffer can then be read into a variable using `read(buffer, *)`. For example, executing the program with `$ ./my_program abc` will set the variable to "abc". For further details, the Intel documentation provides additional insights on using `getarg`.
Manojg
Messages
47
Reaction score
0
Hi,

How can I pass command line argument in FORTRAN 77, like in C/C++?

Thanks.
 
Technology news on Phys.org
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
10
Views
2K
Replies
2
Views
767
Replies
2
Views
1K
Replies
4
Views
2K
Replies
3
Views
2K
Replies
1
Views
3K
Replies
4
Views
1K
Back
Top