BCX Console Demonstration Program s143.bas

 CLS
 
 DIM A$ [6]
 
 A$[0] = "zero"
 A$[1] = "one"
 A$[2] = "two"
 A$[3] = "three"
 A$[4] = "four"
 A$[5] = "five"
 
 CALL Foo1(A$, UBOUND(A$))
 
 SUB Foo1(B$[], size)
   LOCAL i
   PRINT ".............[ Upper Bound On Strings ] ..........."
   FOR i = 0 TO size
     PRINT B$[i]
   NEXT
 END SUB
 
 DIM B[6]
 
 B[0] = 0
 B[1] = 1
 B[2] = 2
 B[3] = 3
 B[4] = 4
 B[5] = 5
 
 CALL Foo2(B, UBOUND(B))
 
 SUB Foo2(C[], size)
   LOCAL i
   PRINT ".............[ Upper Bound On Numerics ] ..........."
   FOR i = 0 TO size
     PRINT C[i]
   NEXT
 END SUB

Result:


 .............[ Upper Bound On Strings ] ...........
 zero
 one
 two
 three
 four
 five
 .............[ Upper Bound On Numerics ] ...........
  0
  1
  2
  3
  4
  5