Mar 26, 2010 #1 Feddozz Mechanical Joined Dec 15, 2005 Messages 16 Location GB 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
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
Mar 26, 2010 #2 IRstuff Aerospace Joined Jun 3, 2002 Messages 44,893 Location US Why wouldn't it be? TTFN FAQ731-376 Upvote 0 Downvote
Mar 26, 2010 #3 johnhors Aerospace Joined Jan 21, 2004 Messages 1,021 Location GB 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) http://www.Roshaz.com Upvote 0 Downvote
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) http://www.Roshaz.com
Apr 12, 2010 Thread starter #4 Feddozz Mechanical Joined Dec 15, 2005 Messages 16 Location GB It works perfectly, Thanks! Upvote 0 Downvote