PROCEDURE
or FUNCTION
types are declared by writing
the prototype
or heading pattern for a class of procedures or functions, i.e.,
the set of procedures or function that have the same pattern for
parameter
list declaration and that return the same type of value in the case
of functions. The variables declared of these
type can take as values names of procedures or function that conform
with the prototype, i.e., that belong to the specified class.
The syntax is:
<type identifier >= PROCEDURE(<parameter list>)
or
<type identifier >= FUNCTION(<parameter list>) : <returned type>
Example:
TYPE TyProcess = PROCEDURE(Material, Machine: INTEGER); VAR Pro1, Pro2: TyProcess;The variables
Pro1, Pro2,
can take the name of any procedure
with any name conforming with the declared prototype. See 2.9 for
declarations of procedures and functions in GLIDER.