Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
FUNCTION Split
PARAMETERS paArr, pcLine, pcDiv
PRIVATE lnLen, lnWid, lnCnt, lnNum, lnStrt, lnPos, lcSub
lnLen = aLen( paArr, 1 ) && Number of rows
lnWid = aLen( paArr, 2 ) && Number of cols
lnCnt = OCCURS( pcDiv, pcLine+pcDiv )
if lnLen < lnCnt
if lnWid > 0
DIMENSION paArr[ lnCnt, lnWid ]
else
DIMENSION paArr[ lnCnt ]
endif
endif
lnStrt = 1
lnNum = 0
do While atc( pcDiv, pcLine+pcDiv, lnNum+1 ) > 0
lnNum = lnNum + 1
lnPos = atc( pcDiv, pcLine+pcDiv, lnNum )
if lnStrt > len(pcLine) && 9/23/99 wgcs
lcSub = ''
else
lcSub = Substr( pcLine, lnStrt, lnPos-lnStrt )
endif
lnStrt = lnPos + len(pcDiv)
if lnWid > 0
paArr[ lnNum, 1 ] = lcSub
else
paArr[ lnNum ] = lcSub
endif
enddo
RETURN lnCnt