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

CALL SYSTEM(...)

milanl
Beginner
742 Views
Windows XP; Compaq Visual Fortran 6.6.0

My Fortran code generates data. They are saved to a file. I need to invoke .exe application (a specialized software) to process the data. My Fortran code will then read the output and continue.

The author of the specialized software suggested to include a CALL SYSTEM('name of software....') in my Fortran code.

So far, I have had only experience with Fortran Console Applications and Fortran Dynamic Link Library. What project type should I use now? Where can I find more info on 'CALL SYSTEM'? Is the book by N. Lawrence helpfull?

Thanks
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
742 Views
You can call SYSTEM() from any type of project. CVF Online Help contains description of every intrinsic or library routine; in "Compatibility" section it is stated which types of project they're compatible with, and "Module" section tells you which module you should USE, if any.

Check out also RUNQQ.

Jugoslav
0 Kudos
milanl
Beginner
742 Views
Thank you very much for your help.

res = RUNQQ('appl.exe',' ')

What instructions can be passed to the program in the second quotes? Is this described somewhere in detail?

Thanks again
0 Kudos
Jugoslav_Dujic
Valued Contributor II
742 Views
These are command-line arguments which are specific for given application or may not be supported at all. For example:

RUNQQ('notepad.exe', "C:BlahBlahwhatever.txt")

will open whatever.txt in notepad, or,

RUNQQ('cmd.exe', '/c dir C:')

will execute "dir" command in command prompt (the same as call SYSTEM('dir C:') )

Jugoslav
0 Kudos
Reply