CLEAR lox = 'x x' xtest(1,2,3,4,5,6,7,8,9,10,11,12,13,14) PROCEDURE xtest LPARAMETERS; pxFirst,; pxSecond,; pxThird,; pll4,; pll_5,; pll__6,; pll___7,; pll____8,; pll_____9,; pll_____10,; pll______11,; pll_______12,; pll________13,; pll________14 LOCAL pcnt,pll pll=2 pcnt = PCOUNT() FOR i=1 TO pcnt lcName = aPara( i, pcnt) ? lcName, EVALUATE(lcName) NEXT RETURN ENDPROCThe first problem is that it will fail after the third para.
CASE lnPar > lnPCount
Better (in the first) would be:CASE lnPar > pcnt
In the second this is wrong too, because you start lnPara with 0 so it must beCASE lnPar > pcnt-1or the like
m.PXFIRST 1 m.PXSECOND 2 m.PXTHIRD 3 m.PLL4 4 m.PLL_5 5 m.PLL__6 6 m.PLL___7 7 m.PLL____8 8 m.PLL_____9 9 m.PLL_____10 10 m.PCNT 14 m.PLL 2 m.I 13 m.LCNAME m.LCNAMEThis is because LIST MEMORY breaks the line if the varname is longer then 10 chars.
*old * lcMemory = STRTRAN(laMemory[lnLine],' ',CHR(13)+CHR(10)) *new lcMemory = laMemory(lnLine) IF !EMPTY(lcMemory) AND OCCURS(' ',lcMemory)<2 AND lnLine<lnLines THEN lnLine = lnLine+1 lcMemory = lcMemory+' '+laMemory(lnLine) ENDIF &&!EMPTY(lcMemory) AND OCCURS(' ',lcMemory)<2 AND lnLine<lnLines lcMemory = STRTRAN(lcMemory,' ',CHR(13)+CHR(10)) lnCnt = ALINES(laVar, lcMemory, .T.)it will work better