This document discusses subprograms in programming languages. It covers the fundamentals of subprograms including definitions, parameters, and parameter passing methods. Key points include:
- A subprogram has a single entry point and control returns to the caller when execution terminates. Parameters can be passed by value, reference, result, or name.
- Issues around subprograms include parameter type checking, local variable scope, and parameter passing semantics and implementation. Languages support different parameter passing methods like pass-by-value or pass-by-reference.
- Parameter passing methods have tradeoffs between efficiency and aliasing. Multidimensional arrays as parameters require type information to be passed correctly in some languages. Subprograms can also