Skip to main content
Top

1985 | OriginalPaper | Chapter

Function procedures

Author : Professor Dr. Niklaus Wirth

Published in: Programming in Modula-2

Publisher: Springer Berlin Heidelberg

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

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.

Metadata
Title
Function procedures
Author
Professor Dr. Niklaus Wirth
Copyright Year
1985
Publisher
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-642-96878-5_14

Premium Partner