- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
I've a problem to call an executable program with fortran windows application. I tried with 'systemqq' but it doesn't function and i found the instruction 'createprocess' but i don't know to make it compiling. Is an instruction of language C? in this case, how can i do to write a C-program with developer studio and mix it with my fortran program?
Thank you and sorry for my bad english!
I've a problem to call an executable program with fortran windows application. I tried with 'systemqq' but it doesn't function and i found the instruction 'createprocess' but i don't know to make it compiling. Is an instruction of language C? in this case, how can i do to write a C-program with developer studio and mix it with my fortran program?
Thank you and sorry for my bad english!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No need to fo to C
You probably just forgot the USE IFPORT statement.
use IFPORT! Needed to get systemqq
integer :: ierr! Error code
character(len=80) :: command! variable to hold the command string
command = "c:pathprogram.exe arg1 arg2 etc"! The command string
if (systemqq(command)) then
ierr = 0! success
else
ierr = 1! failed
endif
Note: You could also use SYSTEM which is an integer function ie returns an integer(SYSTEMQQ is a logical function, returns a logical value)
Hope this helps
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer, it functions but when I want to put an argument which is a filename (variable I open with a dialog box) it doesn't function.
And do you know how I can correctly close a DOS Windows (my executable program) when I have finished to run the program and to return to the last dialog box?
Thank you for your help
Charlotte
here my code:
use ifport
integer::ierr
character(len=80) command
character(len=80) FICHIE ! filename opened with getopenfilename
command=("multi FICHIE") !i'd write it "multi filename" as command line in DOS
And do you know how I can correctly close a DOS Windows (my executable program) when I have finished to run the program and to return to the last dialog box?
Thank you for your help
Charlotte
here my code:
use ifport
integer::ierr
character(len=80) command
character(len=80) FICHIE ! filename opened with getopenfilename
command=("multi FICHIE") !i'd write it "multi filename" as command line in DOS
if (systemqq(command)) then
ierr = 0! success
else
ierr = 1! failed
endif

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