Go to the first, previous, next, last section, table of contents.

Procedures

A procedure declaration is composed of an identifier, a signature (see section Procedure Types), optional local declarations, and statements. The identifier at the end of the procedure must match the id at the beginning. Declarations made in a procedure are local to the procedure: they exist only while the procedure is executing.

If the procedure signature specifies a result type, the procedure is called a function procedure, and it must include a RETURN statement which returns an expression of the specified type. It is a checked runtime error for a function procedure to fail to return a result.


Example


Go to the first, previous, next, last section, table of contents.