This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A question on GFortran


On Wed, Dec 27, 2006 at 09:20:42PM +0100, Angelo Graziosi wrote:
> 
> If I have understood, the correct behaviour is that the compiler should
> consider
> 
>     STOP 99901
> 
> as an abnormal termination. In this case it looks as a G77 bug.
> 
> Is this right?
> 

It depends what you mean by abnormal. :-)
The statement "STOP 99901" is translated into the
C statement "exit(99901)".  It is up to your OS and/or
shell to correctly deal with an exit value of 99901.


> For the sake of completeness if one changes 
> 
>   STOP 99901      with    STOP '99901'
> 

This is essentially the following C code:

   printf("STOP 99901\n");
   exit(0);

Again, it is up to OS and/or shell to correctly
deal with the 0 exit status.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]