CONTINUE(7f) - [FORTRAN:EXECUTION CONTROL] construct
Synopsis
Description
Example
continue
Execution of a CONTINUE statement has no effect. A CONTINUE statement is most often used as a labeled line that is used in transfer control statements to numerically labeled lines such as GOTO. It is often very confusing to have executable statements on labeled lines; a CONTINUE statement eliminates the ambiguities that arise in jumping to an executable line. Preferably no target of a transfer should be an executable statement, but should be a statement like ENDDO or CONTINUE.CONTINUE was very frequently used as the end of a DO loop; ENDDO is now the proper way to end a DO loop.
program demo_continue I=10 J=5 if(I.lt.5)goto 100 J=3 100 continue write(*,*)J=,Jend program demo_continue
Fortran | CONTINUE (7) | January 2017 |