Usually, people
start learning programming by writing small
and simple programs
consisting only of one main program. Here
“main program'' stands for a sequence
of commands or statements which modify data
which is global throughout the whole
program. We can illustrate this as shown
in Fig
This programming technique provides tremendous
disadvantages once the program
gets sufficiently large. For example, if
the same statement sequence is needed
at different locations within the program,
the sequence must be copied. This has
lead to the idea to extract these sequences,
name them and offering a technique
to call and return from these procedures.
|