- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the library routines are documented in the on-disk documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Note that in Intel Fortran, GETARG is an intrinsic routine.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page