- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I would like to use this fortran instruction : call system('aut_xxx',result). Where aut_xxx is an excecutable and result an integer. In aut_xxx.f90, I have instructions like :
if(condition) then
stop 1
endif
I would like to get (in the main program) the value 1 in result (result=1). It does not work. Can someone help me?
Best regrads,
Didace
I would like to use this fortran instruction : call system('aut_xxx',result). Where aut_xxx is an excecutable and result an integer. In aut_xxx.f90, I have instructions like :
if(condition) then
stop 1
endif
I would like to get (in the main program) the value 1 in result (result=1). It does not work. Can someone help me?
Best regrads,
Didace
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In order to use system(), you must conform with the usage shown in the ifort help menu:
USE IFPORT
integer result
...
result = system("aut_xxx")
if(result == -1)then
result = ierrno()
write(*,*)'system() error:',result
endif
As system() is not a Fortran standard, there are various versions, an integer function version being the most common. The USE file actually replaces it by SYSTEMQQ, I believe.
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