4.2 Procedure Body

The body of a procedure consists of executable commands. The last command in the body is a Return and a Return cannot be coded within the body.

A function or a procedure that is declared to be pure is restricted so that they do not have side effects. They can only call other pure procedures and cannot contain input nor output commands. However Trace commands are allowed as they are only intended to be active while debugging. Pure procedures can not raise Error exceptions, but Fault exceptions can be raised by any procedure. Preconditions and Assertion commands in pure procedures can only raise Fault exceptions.


Command Summary Syntax

Assignment


Procedure Invokation


Control


Input and Output

Procedure Precondition

Assign an Expression