|
|
|
|
|
|
|
|
|
|
Expressions
as Parameters -- Caution
|
|
|
|
|
|
|
|
|
|
x = 10
|
|
Call
squid(x+5)
|
|
Print
x
|
|
|
Private
Sub squid(y As Integer)
|
y = 0
|
|
End
Sub
|
|
|
|
|
|
|
BAD
PROGRAM!!
|
Don’t do
this!!
|
|
|
|
|
|
|
|
|
If the actual
parameter is an expression, don’t
assign to the
|
formal parameter! (Otherwise the result gets lost.)
|
|
|
|
|