content_image/852304.jpg
MinMax within a loop c( ntrolled by Item would cause incorrect computation. 

6. The Procedure Statement. III this example, the statement MinMax in the main program activates the procedure. 

<img src='content_image/852304.jpg'>

Examining Program 11.1 in more detail, note that MinMax is activated twice. By formulating tht' program part as a procedure - i.e., by not explicitly writing this prog ram part twice - you can conserve not only your typing time, but ahll the memory (space) used by the program. The static code is stored only once, and the space for local variables is dynamically activated only during the execution of the procedure (created at the beginning and destroyed at the end). 

You should not hesitate, however, from formulating an action as a procedure - even when called on I yonce - if doing so enhances the readability of a program. In gelleral, shorter blocks are easier to understand than long ones. Definilg development steps as procedures makes a more communicable and .erifiable program. 

## H.A.l Parameter lists 

Often necessary with the decompm Ilion of a problem into subprograms is the introduction of new variable', to represent the arguments and the results of the subprograms. The purpose of such variables should be clear from the program text. 

Program 11.2 extends the abow example to compute the minimum and maximum value of an array in ,I more general sense. This illustrates several further points about procedures. 

