vb6-array-types-continued
vb6-array-types-continued
For i = 0 To 4
Dim total As Integer
Debug.Print students(i) & Space(16 - Len(students(i)));
For j = 0 To 3
Debug.Print Format(grades(i, j), "00") & Space(6);
total = total + grades(i, j)
Next j
For i = 0 To 3
Dim total As Currency
For j = 0 To 11
total = total + sales(i, j)
Next j
For row = 0 To 5
Debug.Print "Row " & (row + 1) & ": ";
For seat = 0 To 9
If seatStatus(row, seat) Then
Debug.Print "[" & seating(row, seat) & "] ";
Else
Debug.Print "[ ] ";
End If
Next seat
Debug.Print
Next row
End Sub
' Quantity
inventory(i, 2) = Int(Rnd * 100) + 1
' Price
inventory(i, 3) = (Rnd * 1000) + 10
For i = 0 To 9
Debug.Print inventory(i, 0) & Space(6) & _
Left(inventory(i, 1) & Space(18), 18) & _
Format(inventory(i, 2), "000") & Space(6) & _
Format(inventory(i, 3), "$#,##0.00") & Space(4) & _
inventory(i, 4)