- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcas:
- Intel® Fortran Compiler
Link copiado
1 Responder
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora