BCX Console Demonstration Program s148.bas

 DIM in$, i, z
 DIM ar[20]
 DIM f![20]
 DIM d#[20]
 DIM g![20,20]
 
 in$ = "1.1, 3.3, 5.5, 7.7, 9.9, 11.11"
 z = FILLARRAY(in$, vt_SINGLE, 6, f!)
 FOR i = 0 TO z
   PRINT "f["; MID$(STR$(i), 2); "] = "; f![i]
 NEXT
 
 in$ = "1, 3, 5, 7, 9, 11"
 z = FILLARRAY(in$, vt_INTEGER, 6, ar)
 FOR i = 0 TO z
   PRINT "ar["; MID$(STR$(i), 2); "] ="; ar[i]
 NEXT
 
 in$ = "1.1, 3.3, 5.5, 7.7, 9.9, 11.11"
 z = FILLARRAY(in$, vt_DOUBLE, 6, d#)
 FOR i = 0 TO z
   PRINT "d["; MID$(STR$(i), 2); "] ="; d#[i]
 NEXT
 
 in$ = "1.1, 3.3, 5.5, 7.7, 9.9, 11.11"
 z = FILLARRAY(in$, vt_SINGLE, 6, &(g![0, 0]))
 FOR i = 0 TO z
   PRINT "g[0]["; MID$(STR$(i), 2); "] = "; g![0][i]
 NEXT
 
 in$ = "3.3, 5.5, 7.7, 9.9, 11.11, 13.13"
 z = FILLARRAY(in$, vt_SINGLE, 6, &(g![1, 0]))
 FOR i = 0 TO z
   PRINT "g[0]["; MID$(STR$(i), 2); "] = "; g![0][i]; " g[1]["; _
   MID$(STR$(i), 2); "] = "; g![1][i]
 NEXT

Result:


 f[0] =  1.1
 f[1] =  3.3
 f[2] =  5.5
 f[3] =  7.7
 f[4] =  9.9
 f[5] =  11.11
 ar[0] = 1
 ar[1] = 3
 ar[2] = 5
 ar[3] = 7
 ar[4] = 9
 ar[5] = 11
 d[0] = 1.1
 d[1] = 3.3
 d[2] = 5.5
 d[3] = 7.7
 d[4] = 9.9
 d[5] = 11.11
 g[0][0] =  1.1
 g[0][1] =  3.3
 g[0][2] =  5.5
 g[0][3] =  7.7
 g[0][4] =  9.9
 g[0][5] =  11.11
 g[0][0] =  1.1 g[1][0] =  3.3
 g[0][1] =  3.3 g[1][1] =  5.5
 g[0][2] =  5.5 g[1][2] =  7.7
 g[0][3] =  7.7 g[1][3] =  9.9
 g[0][4] =  9.9 g[1][4] =  11.11
 g[0][5] =  11.11 g[1][5] =  13.13