<HTML><FONT FACE=arial,helvetica><FONT  SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">on tryLoopFor<BR>
  put "a,b,c,d,e,f" into charList<BR>
  repeat for each item n in charList<BR>
   put item n of charList into line n of newCharList ** put n of charList into...<BR>
  end repeat<BR>
  put newCharList &&"for"<BR>
end tryLoopFor</BLOCKQUOTE></FONT><FONT  COLOR="#000000" style="BACKGROUND-COLOR: #ffffff" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0"><BR>
<BR>
</FONT><FONT  COLOR="#000000" style="BACKGROUND-COLOR: #ffffff" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">The variable n contains the item value, not the number of the item... Ech time the routine cycles, n takes on the value of the next item in charList.<BR>
<BR>
But you have a wee problem using 'for each' in your example above given thant n is not a number so you cannot use it to refer to a line of newCharList. Either try including an incrementor, or stick to your original 'repeat with n=1 to ...' system.<BR>
<BR>
</FONT><FONT  COLOR="#000000" style="BACKGROUND-COLOR: #ffffff" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">hth<BR>
<BR>
/H<BR>
</FONT><FONT  COLOR="#000000" style="BACKGROUND-COLOR: #ffffff" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0"><BR>
</FONT></HTML>