Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussões

Return exit status codes w/o extra output

tobias-burnus
Principiante
619 Visualizações
Hello,

I'd like to return exit error codes if an error occures, but I don't want to output this exit error code.

Currently I use:

if(iostat /= 0) then
write(ERROR_UNIT,*) 'Cannot open file "',trim(filename),'"'
stop 1
end if


But this shows not only the error message but also a "spurious" one. If I write
stop "some error string"

or simply
stop

then the exit status code is zero.

Any ideas?

Tobias
0 Kudos
1 Responder
Steven_L_Intel1
Funcionário
619 Visualizações
Try CALL EXIT(1) instead.
Responder