lcString = ""
myJoin(@lcString, @aArray, CHR(10))
RETURN
* 为防止生成字符串太长参数传递往返消耗资源,用传址方式返回字符串
PROCEDURE myJoin(tcString, tcArray, tcDelimiter)
LOCAL lnLen, lnIndex
tcString = ""
lnLen = LEN(aArray)
FOR lnIndex = 1 TO lnLen
tcString = tcString + aArray[lnIndex]
IF lnIndex < lnLen
tcString = tcString + tcDelimiter
ENDIF
NEXT
ENDPROC