Scalar Variables

Sub Main ()
    Dim x(5) As Integer
    Dim i As Integer
    For i = 0 to 5         x(i) = i     Next i
    Print i     Joe (i), x            ' The parenthesis around it turn it into an expression which passes by value     Print "should be 6: "; x(2), i End Sub   Sub Joe( ByRef j As Integer, ByRef y() As Integer )     Print "Joe: "; j, y(2)     j = 345
    For i = 0 to 5         Print "i: "; i; "y(i): "; y(i)     Next i
 
    y(2) = 3 * y(2) End Sub