repeat for each....
FlexibleLearning at aol.com
FlexibleLearning at aol.com
Mon Aug 25 11:16:00 EDT 2003
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030825/85304f9f/attachment.html>
More information about the use-livecode
mailing list