Procedures and Functions



Procedures and Functions: Overview



Declaring and Calling a Procedure



Procedure with Parameters



Procedure with a Local Variable



Scope



Order of Declarations



Global Variables



Parameter Modes - In and Out Modes



Structure Charts



Example with In Mode and Out Mode



Example with In Out Mode Parameters



Why Parameter Modes



Compiler Mode Checks



Functions



Example Functions



Restrictions on Functions



Terminology: Procedures, functions, methods, routines



Question: Can we call multiple functions



Side Effects



Looking Ahead: Arrays as Parameters