A question on GFortran

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Dec 27 20:53:00 GMT 2006


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



More information about the Fortran mailing list