* This is the counterpart of VFP's ALINES() function. * It will return a string that has the elements of a ONE-DIMENSIONAL array (1st parm) on separate lines. * The routine uses the TRANSFORM() function for the conversion. * Accepts an optional 2nd parameter that's used as 2nd parameter for the TRANSFORM() function. * Pass True as 3rd parameter if you want the lines to be without leading and trailing spaces. * Pass True as 4th parameter if you want to exclude empty elements. * Usage: * lcMultiLineText = AlinesX( @aArray, cFormatCodes ) FUNCTION aLinesX lparameters taArray, tcFormatCodes, tlTrim, tlNotIfEmpty local lcResult, lnCount, lcFormatCodes, lcLine external array taArray lcFormatCodes = iif( pcount() > 1, m.tcFormatCodes, '' ) lcResult = "" for lnCount = 1 to alen( taArray, 1 ) lcLine = transform( taArray[ m.lnCount ], m.lcFormatCodes ) && Using taArray[x,1] gave weird results. Must be a VFP-quirck! if m.tlTrim lcLine = alltrim( m.lcLine ) endif if not m.tlNotIfEmpty or not empty( m.lcLine ) lcResult = m.lcResult + chr(13) + chr(10) + m.lcLine endif next lcResult = substr( m.lcResult, 3 ) RETURN m.lcResultEventually you modify the code and parameterlist to use another delimiter instead of the default chr(13)+chr(10).