Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run a executable program in Compaq visual fortran

Status
Not open for further replies.

leaderagha

Programmer
Oct 2, 2006
2
TR
I want to run a executable program in my program. My program is running following routine:

1. Main program
call .......(the subroutine or function which has the code about running the executable program.

2. Subroutine or function (to run the executable program)

For example: I want to call winamp.exe in my fortran code.How can I do this? Please give me a simple example code.

 
Don't know about COMPAQ - on Gnu it is system. eg
Code:
call system ('winamp.exe')
Failing that, you could try looking up exec or execlp if they exist on Compaq.
 
I think that it should be

i=SYSTEM('winamp.exe')

in this compiler, with i, some integer return code.

 
In Visual fortran to run external executable file you can use runqq or systemqq commands

result = RUNQQ (filename, commandline)
result = SYSTEMQQ (commandline)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top