Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OOPMENU.ZIP
Filename : LIST2ARR.PRG

 
Output of file : LIST2ARR.PRG contained in archive : OOPMENU.ZIP
/***
* ListAsArray( , ) --> aList
* Convert a delimited string to an array
*
* Copyright, Nantucket Corporation, 1990
*/

FUNCTION ListAsArray( cList, cDelimiter )
LOCAL nPos
LOCAL aList := {} // Define an empty array

IF cDelimiter = NIL
cDelimiter := ","
ENDIF

WHILE (nPos := AT(cDelimiter, cList)) != 0
AADD(aList, SUBSTR(cList, 1, nPos - 1)) // Add a new element
cList := SUBSTR(cList, nPos + 1)
END
AADD(aList, cList) // Add final element

RETURN aList // Return the array


// eof list2arr.prg


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OOPMENU.ZIP
Filename : LIST2ARR.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/