Re: Exit code with Fortran 90



Andrea Francia wrote:
If I use the istruction
stop n
where n is a integer I found that the program terminate with n as exit code.

I see that this happen compiling when I use the GNU Fortran compiler (gfortran).

Is this behaviour standard, or it is a special behaviour of gfortran?

As Dan says, it is not required by the Fortran Standard per se.
However the POSIX Fortran Binding (1003.9-1992) does specify this
behavior (for small integer values.) As desirable as the feature
is, some compilers do it and some don't.

W.
.



Relevant Pages

  • Re: Exit code with Fortran 90
    ... where n is a integer I found that the program terminate with n as exit code. ... I see that this happen compiling when I use the GNU Fortran compiler. ... Is this behaviour standard, or it is a special behaviour of gfortran? ...
    (comp.lang.fortran)
  • Re: Exit code with Fortran 90
    ... where n is a integer I found that the program terminate with n as exit code. ... I see that this happen compiling when I use the GNU Fortran compiler. ... it is quite useful when implemented as an exit code that can be passed to other process/command interpreters. ...
    (comp.lang.fortran)
  • Re: Exit code with Fortran 90
    ... where n is a integer I found that the program terminate with n as exit ... I see that this happen compiling when I use the GNU Fortran compiler ... Is this behaviour standard, or it is a special behaviour of gfortran? ...
    (comp.lang.fortran)
  • incorrect old gcc exit code
    ... it is that it returns 0 always, no matter succeeded it in compiling or ... So no surprise configure script fails wherever it uses gcc to ... exits with a proper exit code: ...
    (comp.os.lynx)
  • Exit code with Fortran 90
    ... where n is a integer I found that the program terminate with n as exit code. ... I see that this happen compiling when I use the GNU Fortran compiler. ... Is this behaviour standard, or it is a special behaviour of gfortran? ...
    (comp.lang.fortran)