Sheltran - PERFORM and PROC
C To invoke a procedure section:
PERFORM <procedure name>
C To define a procedure section:
PROC <procedure name>
- The procedure name must not be longer than 31 characters.
- The statements in a PROC may not include:
- STOP or RETURN
- XWHILE, XREPEAT or XFOR unless the corresponding loop is wholly
included within the range of the PROC-CPROC construct.
- A procedure section may only be defined in a program after all
PERFORMs to that PROC have occurred, i.e. PROCs normally preceed the
- A PERFORM in a FOR-loop causes non-standard FORTRAN to be
Whenever a PERFORM statement is encountered, the appropriate statements
between PROC and CPROC are executed.