Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Passing arguments to fortran exec

Status
Not open for further replies.

Feddozz

Mechanical
Dec 15, 2005
16
Hello,
my executables read input files, calculate and write output files.
I would like to pass the name of the input file as an argument on the command line environment.
I.e.:
c:\>Myprogram c:\input_file.txt

Is it possible with FORTRAN?

Thanks in advance!
Vince
 
Replies continue below

Recommended for you

Vince - the following are now part of the fortran standard:-

command_argument_count()
call get_command_argument
call get_command


for example:-

Code:
      if (command_argument_count().gt.0) call get_command_argument(1,file,length,ierr)




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor