basic

#### Scalar Variables

1. Sub Main

   1. Dim x(5) As Integer

      Dim i As Integer

      for i = 0 to 5

      1. 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 )

   1. print "Joe: "; j, y(2)

      j = 345

      for i = 0 to 5

      1. print "i: "; i; "y(i): "; y(i)

      next i

      y(2) = 3 * y(2)

   End Sub