ID : 327
ByVal
Function
To set argument(s) to hand to the procedures for pass by value.
Description
This is a modifier to designate the procedure argument to pass by value.
More than one argument can be designated by separating each by a comma.
"ByVal" is mandatory. If omitted, the argument will be "pass by reference."
Related Terms
Attention
-
Example
'!TITLE "Pass by Value of Augment"
' Add 20 to a value received by passing by value and display it on the message output window
Sub Sample_ByVal
Dim aaa As Integer
aaa = 10
SubProc aaa
' Display "10" on the message output window
PrintDbg aaa
End Sub
Sub SubProc( ByVal bbb As Integer )
bbb = bbb + 20
End Sub
ID : 327