1985 | OriginalPaper | Chapter
Function procedures
Author : Professor Dr. Niklaus Wirth
Published in: Programming in Modula-2
Publisher: Springer Berlin Heidelberg
Included in: Professional Book Archive
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
So far we have encountered two possibilities to pass a result from a procedure body to its calling place: the result is either aligned to a non-local variable or to a variable parameter. There exists a third method: the function procedure. It permits the use of the computed result (as an intermediate value) in an expression. The function procedure identifier stands for a computation as well as for the computed result The procedure declaration is characterized by the indication of the result’s type behind the parameter list As an example, we rephrase the power computation given above.