on tryLoopFor
put "a,b,c,d,e,f" into charList
repeat for each item n in charList
put item n of charList into line n of newCharList ** put n of charList into...
end repeat
put newCharList &&"for"
end tryLoopFor
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.
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.
hth
/H
- repeat for each.... Mark Smith
- Re: repeat for each.... Ludovic Th�bault
- Re: repeat for each.... Klaus Major
- Re: repeat for each.... Dave Cragg
- Re: repeat for each.... Geoff Canyon
- FlexibleLearning
