Parse To Array

This parses a text string to an array, based on the delimiter passed.

ParseToArray calls ParseToArray which can be found on the previous page.
Here's some example code:
Array Text(aParsedText;0)

  ` ParseToArray
  ` Parses text passed to a text array as per the delimiter passed
  ` $1 - Text
  ` $2 - Array Pointer
  ` $3 - Delimiter
  ` $4 - Max length for any element
  ` $0 - Size of array returned


If (Count parameters>=4)
End if 

$TextLength2:=Length(Replace string($Text;$DelimitStr;""))

ArrayResize ($DelimitCount*2+1;$ArrayPtr)  ` *2 is for padding

While (Length($Text)>0)
  If ($Pos<=0)
    $Pos:=Length($Text)+$DelimitLength  `1
  End if 
  If ($Len>$BreakWidth)
    $Pos:=$Len  ` This is to keep the character that's at the "new" position.
  End if 
  If ($Pos0)
    `End if 
End while 

If (Size of array($ArrayPtr->)>$Ndx)
  DELETE ELEMENT($ArrayPtr->;$Ndx+1;Size of array($ArrayPtr->))
End if 

$0:=Size of array($ArrayPtr->)