To define a procedure, type a PROC command which specifies the name of the
procedure and the names of its parameters.
ICL then returns a new prompt using the name of the procedure (rather than
ICL>) to show that you are in the procedure entry phase of procedure mode.
The statements that make up the procedure are then entered, followed by an
END PROC or ENDPROC to mark the end of the procedure.
For example:
ICL> PROC SQUARE_ROOT X
SQUARE_ROOT> { An ICL procedure to print the square root of a number
SQUARE_ROOT> PRINT The Square Root of (X) is (SQRT(X))
SQUARE_ROOT> END PROC
ICL>
ADAM The Starlink Software Environment