BCX Console Demonstration Program S144.bas

 CLS
 DIM A$[100], B$, I, J
 
 B$ = "Here is,,," & DQ$ & "New,Test" & DQ$ & ";Test!"
 
 I = SPLIT(A$, B$, ",;+")
 
 PRINT "Sample String = ", B$
 PRINT "**********************************"
 PRINT I, " Only elements stored"
 PRINT "**********************************"
 
 FOR J = 0 TO I-1
   PRINT "[", J, "] LEN =", LEN(A$[J]), " Cell = ", A$[J]
 NEXT
 
 PRINT
 
 I = SPLIT(A$, B$, ",;+", 1)
 
 PRINT "**********************************"
 PRINT I, " Elements and Delimiters stored"
 PRINT "**********************************"
 
 FOR J = 0 TO I - 1
   PRINT "[", J, "] LEN =", LEN(A$[J]), " Cell = ", A$[J]
 NEXT
 
 PRINT
 
 I = SPLIT(A$, B$, ",;+", 2)
 
 PRINT "**********************************"
 PRINT I, " Elements and Delimiters stored"
 PRINT "**********************************"
 
 FOR J = 0 TO I - 1
   PRINT "[", J, "] LEN =" , LEN(A$[J]), " Cell = ", A$[J]
 NEXT