


1/24/00
COM1100 Winter2000 Lecture 7
Actual and Formal arguments – pass by
reference
nHere actual
arguments m,n and formal
arguments x, y reference the same
data items.
nThe significance of this
is that the values in the actual arguments (m, n) can now be altered from within Swap by using the
formal names (x, y).
nx, y do not store
copies of the values in m, n, but directly
access the locations in memory set aside for
these two arguments.