The Idea of Procedures
v Procedures encapsulate computation for general
application
o A procedure’s operation should be hidden from view
o It must be possible to give data to a procedure and get
results back from the procedure
o All of the possible eventualities must be considered
v The procedure concept has two parts:
o A procedure “declaration” -- defines how computation goes
o Many procedure “calls” -- requests to have the procedure
performed
The fundamental idea of procedures: Whenever
the procedure is called, “substitute” its definition