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