This is driving me barmy...can any kind soul here explain why this works:
on tryLoopWith put "a,b,c,d,e,f" into charList repeat with n = 1 to the number of items in charList put item n of charList into line n of newCharList end repeat put newCharList && "with" end tryLoopWith
but this throws up a 'bad chunk expression" :
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 end repeat put newCharList && "for" end tryLoopFor
In your second example, the variable n doesn't contain a number but the actual value of the current item in the list.
Try this:
on tryLoopFor
put "a,b,c,d,e,f" into charList
repeat for each item n in charList
put n & return after newCharList
end repeat
delete char -1 of newCharList ## delete final return
put newCharList && "for"
end tryLoopForDave _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
