repeat for each....
Mark Smith
mark at maseurope.net
Mon Aug 25 07:52:01 EDT 2003
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
I haven't yet been able to make the 'repeat for each...' structure work
at all, not even once, in any circumstance, in a year of trying it from
time to time. I can find nothing in the electronic docs to help me. I
am mystified.
TIA, Mark Smith
More information about the use-livecode
mailing list