return value from fortran program

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Sep 16 20:52:00 GMT 2008


On Tue, Sep 16, 2008 at 08:37:34PM +0000, RadSurfer wrote:
> How can we pass the integer value we want to the calling shell, as a 'return' or
> 'error value' ?
> 

>From the documentation provided with your compiler.

          program test_exit
            integer :: STATUS = 0
            print *, 'This program is going to exit.'
            call EXIT(STATUS)
          end program test_exit

-- 
Steve



More information about the Fortran mailing list