Let’s discuss procedures today. Most of us perform many tasks by ourselves when we are young — like cooking, driving, or gardening. But as we grow older, we often assign these responsibilities to other people. For example, we may hire a chef to cook food, a driver to take us wherever we need to go, and a gardener to take care of the lawn, do plantation, and look after the plants.
Now imagine this:
You press a bell, the chef comes, and you tell him what you want to eat today. That information you give him is the parameter you are passing after calling him. A parameter can be a string, integer, boolean, real, or character data. Based on the data you provide, he performs the task or calculation that you assigned.
But remember — a procedure cannot return any value back to the main program. However, it can produce output inside its own block.
That is exactly how a procedure works.
