※ 引述《hatvito (please get中島銀)》之銘言:
: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
: System.EventArgs) Handles MyBase.Load
: Dim x As Integer
: x = 3
: Call f1(x)
: Debug.Print(x)
: End Sub
: Sub f1(ByRef x As Integer)
: Call t2(x = x + x, x, x)
: End Sub
: Sub t2(ByRef a As Integer, ByVal b As Integer, ByRef c As Integer)
: a = a + 1
: b = b + 2
: c = a + b * c
: End Sub
: 結果是16
: 問題是出在A
: A執行結果是1
: 也就是說A收到的零
: 為什麼呢?
我也想問, c=a+b*c ,c的值為什麼是3,而不是1