Procedures and Functions



Procedures and Functions, and Scope





Java Methods



Procedure and Functions



Scope



Mutual Recursion



Global Declarations and Variables



WARNING: Unitialized Variables



Functions and Strong Typing



Function Calls as Arguments



Expression Functions



Terminology



Parameter Modes





Parameter Modes and Java



Parameters Modes and Information Flow



Parameter Modes - In and Out Modes



Example with In Mode and Out Mode



Example with In Out Mode Parameters



Why Parameter Modes



Modes: Initialization, Constants, Modification



Parameter Modes Improve Error Detection



Parameter Mode vs Parameter Passing Mechanism



Procedure vs Function





Functions are Values; Procedures are Statements



Java and C Can Ignore Expression Results



Procedures or Functions: Which to use



Recursive Routines





Recursive Routines



Mutually Recursive Routines



Mutually Recursive Routines - Problem solved



Mutually Recursive Routines - Problem Solved