PROCEDURE <sig> where <sig> = "(" { <formal> ";" ... } ")" [ ":" <result type> ] [ RAISES ( ANY | "{" { <exception> "," ... } "}" ) ] <formal> = [ VAR | READONLY | VALUE ] <id> { "," <id> ... } [ ":" <type> ] [ ":=" <const expr> ]
If a result type for the procedure is specified, then the procedure must return a value of that type.
If a constant expression <const expr> is supplied as a default value for a formal parameter, the type may be omitted, and when the procedure is called, if an argument is not supplied for a formal with a default value, the default value is used to initialize the formal.
The RAISES section specifies which exceptions the procedure is allowed to raise. Any exceptions that occur in the procedure, possibly as the result of a call to another procedure, that are not handled by the procedure and that do not appear in the RAISES clause cause a checked run-time error. If the RAISES section is omitted, then any exceptions raised cause a checked run-time error.
The VAR, VALUE, and READONLY parameter modes determine how the actual argument is associated with the formal parameter: