Section 9.5: Subroutines (Frame 1)                     [     ][home][next]

Subroutines are one of the major structuring ideas in computer science. The ability to package up a series of instructinos and give a single label or name to the package ties in with how the human mind manages complexity in the world. Psychologists call this "chunking" whereby a single name stands in for an ensemble of related ideas or parts, thereby taxing our limited-capacity short term memories much less than having to keep many different things in mind at once.

It is assumed that the reader knows enough about high-level programming to feel familiar with the idea of a subroutine and how it works. As a matter of terminology, subroutines masquerade under many different names: procedures, functions, methods, subs, among others.