Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29390 Discussions

Parameter input with execution of fortran code

pfwang
Beginner
642 Views

At one time (long time ago), Iran a fortran executable file with a parameter as input after the executable file:

file.exe 10.3

where file.exe is the executable file, and 10.3 is some parameter input for theprogram. This command is in Dos windows.

How should I write the code in fortran thataccept the input as above?

I used

read(5,*) param

in the code and it waits me to punch the return keyandtype in10.3 manually.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
642 Views
Read about the GET_COMMAND and GET_COMMAND_ARGUMENT intrinsic functions.
0 Kudos
Reply