END
◄Up► ◄Contents► ◄Index► ◄Back►
─────END────────────────────────────────────────────────────────────────────
Action
Terminates execution of the main program, or returns control from a
subprogram.
Syntax
END
Remarks
The END statement marks the end of the program unit in which it
appears. It must be the last statement in every program unit.
An END statement must appear by itself on an unlabeled initial
line (not a continuation line). No FORTRAN statement may have an
initial line that appears to be an END statement (such as
splitting an END IF statement over two lines).
In a subprogram, the END statement has the same effect as a RETURN
statement.
Example
C An END statement must be the last statement in a program
C unit:
PROGRAM MyProg
WRITE (*, '("Hello, world!")')
END
-♦-