General information
Category:
Coding, syntax & commands
Hello Scott !
Hiere are 2 other solutions for your Problem:
*** 1st Solution via SUBSTR
cString = "123 12 456 123456 123, 32,99 999, 88 777777,,123,"
cDelimiter = ","
nElements = OCCURS( "," , cString )
DIMENSION cArray( nElements )
FOR ij = 1 TO nElements
cArray( ij ) = SUBST( cString , AT( cDelimiter , cDelimiter + cString , ij ) , AT( cDelimiter , cDelimiter + cString , ij +1 ) -AT( cDelimiter , cDelimiter + cString , ij ) -1 )
? cArray( ij )
ENDFOR
*** 2nd Solution via MEMLINES
cString = "123 12 456 123456 123, 32,99 999, 88 777777,,123,"
cDelimiter = ","
cNewstring = CHRTRAN( cString , cDelimiter , CHR(13) )
nElements = MEMLINES( cNewstring )
DIMENSION cArray( nElements )
FOR ij = 1 TO nElements
cArray( ij ) = MLINE( cNewstring , ij )
? cArray( ij )
ENDFOR
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only