Is it always right to end the FORTRAN program with the STOP instruction?

As the name says, really.

Is there anything against not using stop, for example:

PROGRAM myprog
. 
. < do stuff >
.
END PROGRAM myprog

instead of using an explicit stop, like this:

PROGRAM myprog
. 
. < do stuff >
.
STOP
END PROGRAM myprog

I see a lot of older fortran code that has STOPstatus before END PROGRAM, but is it really needed there?

On our Cray machine, which has a line STOPat the end of the program, it writes the STOP line to STDERR, which is a little annoying ...

+4
source share
1 answer

Code

stop
end program

Fortran. A stop - 0 , . end program, , 0 .

. , stop . (Fortran 2008, . 8.4) :

STOP STOP, , , . - (14) , , ; , (13.8.2.8). , .

, - , stop. - stop, stop. , , , .

stop , .

, stop, end , FORTRAN66 .

+7

Source: https://habr.com/ru/post/1610599/


All Articles