'----------------------------------------------------------------------
'                            ARRAY.BAS
'                    (c) 1998-2003 MCS Electronics
'----------------------------------------------------------------------

$default Xram
Dim Idx1 As Integer                                         'index
Dim B1(1000) As Byte                                        'byte array
Dim I(500) As Integer                                       'integer array
Dim S(100) As String * 20                                   'string array , each string can be 20 characters long

For Idx1 = 1 To 10                                          'fill part of array
  B1(idx1) = Idx1
  I(idx1) = Idx1
  S(idx1) = Str(b1(idx1))                                   'assign a string
Next

For Idx1 = 1 To 10                                          'print the first 10
  Print B1(idx1) ; "  " ; I(idx1) ; " " ; S(idx1)
Next

End