09-26-2014, 12:28 PM
The following piece of code gives an output value 10 :
'--------------------------
But the following code gives an output value 11 :
'----------------------------
Its clear that the use of the "Call" statement is the reason behind the difference in the output.
But why does that happen?
Code:
Function FinalVal( ByRef var )
var = var + 1
End Function
Dim x: x = 10
FinalVal(x)
MsgBox x
But the following code gives an output value 11 :
Code:
Function FinalVal( ByRef var )
var = var + 1
End Function
Dim x: x = 10
call FinalVal(x)
MsgBox x
Its clear that the use of the "Call" statement is the reason behind the difference in the output.
But why does that happen?