Dividing Problems Up Into Modules: Functions And Procedures
Notes for the required material
You can find a text-only versions of the notes (no text-formatting or
graphics) under the Unix directory: /home/231/notes/functions
Functions and Procedures in Pascal (Leestma & Nyhoff Sections 5.1, 5.2, 5.5 and
5.6). However, you don't need to worry about defining
functions within functions (like they illustrate in Section 5.6). You may also want to read through Section
5.3, 5.4 and 5.7 for additional examples, the latter Section provides an
example of applying the top-down approach from the design step to actual
implementation in Pascal: [PowerPoint]
[pdf]
Recursion in Pascal (Leestma & Nyhoff Section 7.6): [PowerPoint]
[pdf]
Optional teaching material
Some more advanced file-related topics that can be covered include:
determining the file to be opened at run time and binary files.
Background / Sources of additional information
Pascal Programming and Problem Solving by Leestma S. and Nyhoff L. 4th
Edition (MacMillan Publishing Company).
Pascal an Introduction to the Art and Science of Programming by Savitch
W.J. (The Benjamin / Cummings Publishing Co., Inc.).
The Pascal link under the
GNU website (since the U of C uses the GNU Pascal compiler gpc).