Unformatted text preview: gram is called, a list of the arguments is given to the subprogram (put on the subprogram’s message board). The arguments tell the subprogram where to find the values it is supposed to use. When a parameter is used in the body of the subprogram, the subprogram accesses it through a relative position on the message board. That is, the subprogram looks for its first parameter in the first position on the message board and for its second parameter in the second position on the message board. See Figure 8.6. There must be the same number of arguments in the call as there are parameters in the subprogram heading, and the parameters and arguments must match up in both position and data type. Because the arguments and parameters are matched by position, their names don’t have to be the...
View Full Document
- Fall '10
- Subroutine, subprogram, message board