Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing arguments through the command line to a fortran program

Status
Not open for further replies.

ultranoize

Technical User
Dec 4, 2007
2
DK
Hi

I'd like to write a simple fortran program "myprog.exe" which i can execute through a batch file by doing

call myprog.exe arg1 arg2 arg3

The question is then how do i write the program in fortran so it reads the command line arguments??



 
Got it.

N = IARGC ()
gets the number of arguments

CALL GETARG(I , STR)}
gets arg I and puts it in string STR

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top