A parameter is a value that is passed to a procedure when it is called.
The names of the parameter(s) are specified in the procedure declaration:
The value(s) to be sent are specified when the procedure is called.
Procedures with parameters are easy to re-use because they don’t all have to use the same values – you could create procedures to draw polygons of any size, for example.
| |