Procedure definition:

<procedure definition>  ::= <procedure head> <statement list> <ending>

<procedure head>        ::= <procedure name> ;
                          | <procedure name> <type> ;
                          | <procedure name> <parameter list> ;
                          | <procedure name> <parameter list> <type> ;

<procedure name>        ::=  <label definition> PROCEDURE

<parameter list>        ::= <parameter head> <identifier> )

<parameter head>        ::=  (
                          | <parameter head> <identifier> ,

<ending>                ::= END
                          | END <identifier>
                          | <label definition> <ending>

<label definition>      ::= <identifier> :
Procedures are non-recursive, and must be defined prior to use. Each of the formal parameters in the <parameter list> must be declared inside the procedure. XPL procedures are called by value.

Variables declared inside a procedure have a scope which is that procedure and any nested procedures.

Function procedures may be typed, or will default to fixed.