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

Passing start parameters?

h-faber
Beginner
720 Views
Hi,
is it possible to catch start parameters which I want to submit on the command line? I want to call something like
myfortranprog.exe param1 param2
Is this possible, if so, how can I access these parameters in the Fortran code?
Thanks in advance.
0 Kudos
5 Replies
anthonyrichards
New Contributor III
720 Views
Look at the DFLIB routine GETARG for getting command-line arguments, along with NARGS for counting them. You need to add USE DFLIB to your code.
0 Kudos
h-faber
Beginner
720 Views
Hi,
thanks a lot, works perfectly!
How do you know of this lib and these functions? Is there any documentation available for this and the other libraries such as dfcom, dfauto etc.?
0 Kudos
Steven_L_Intel1
Employee
720 Views
All the library routines are documented in the on-disk documentation.
0 Kudos
anthonyrichards
New Contributor III
720 Views
Hi. I should of course have mentioned that I use Compaq Visual Fortran (CVF) 6.6, not Intel Fortran, hence the mention of DFLIB.The routines are in appendix E in the printedFORTRAN Reference manual that came with it. I admit, the on-line documentation is lacking as to how to find them without knowing they are there.
0 Kudos
Steven_L_Intel1
Employee
720 Views
I think you will find that the routine is listed in the on-disk documentation index, and is included in the documentation of the portability routines.

Note that in Intel Fortran, GETARG is an intrinsic routine.
0 Kudos
Reply