Homogeneous Composite Types Of Variables: One Dimensional
Arrays
Notes for the required material
- These notes can be purchased in the Student Union Copy Center at cost
- Arrays in Pascal (Leestma & Nyhoff Chapter
Chapter 9.1, 9.2, you may also want to read through Section 9.3 for a larger
example that uses 1D arrays): [PowerPoint] [Acrobat]
Optional teaching material
Given that there is time (and if the teaching language provides such an
option) it would be beneficial for the instructor to spend time with a specific
type of array: the String. In most programming languages a String is
a type and consequently many useful utilities are provided (string operations
such as concatenation, string comparisons etc.). Another area that can be
covered if there is sufficient time is the topic of packed arrays and how they
can be used to more efficiently utilize memory but at the cost of increasing
computation time (to find the correct index).
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 Computer Science department uses the GNU Pascal
compiler gpc).
Teaching Tips