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

```

Result:

```
Sample String = Here is,,,"New,Test";Test!
**********************************
5 Only elements stored
**********************************
[ 0] LEN = 7
[ 1] LEN = 0
[ 2] LEN = 0
[ 3] LEN = 8
[ 4] LEN = 5

**********************************
9 Elements and Delimiters stored
**********************************
[ 0] LEN = 7
[ 1] LEN = 1
[ 2] LEN = 0
[ 3] LEN = 1
[ 4] LEN = 0
[ 5] LEN = 1
[ 6] LEN = 10
[ 7] LEN = 1
[ 8] LEN = 5

**********************************
3 Elements and Delimiters stored
**********************************
[ 0] LEN = 7
[ 1] LEN = 8
[ 2] LEN = 5

```