Using 'for each' to modify a container

Trevor DeVore lists at mangomultimedia.com
Thu Oct 12 08:59:00 CDT 2006


On Oct 12, 2006, at 12:03 AM, Mark Smith wrote:

> Clearly, it shouldn't be necessary, but I wonder if putting empty  
> into LNN or "delete variable LNN" after each loop has finished  
> would cure that?

Putting empty into the labelVariable in each repeat loop solves some  
problems so I would imagine it would in the above as well.  I've done  
this before:

repeat for each line theLine in theData
     split theLine by ";" AND ":"
     -- do something fancy
     put empty into theLine
end repeat

Without the line "put empty into theLine" the code doesn't always  
work correctly.  With the line it does.  Of course, according to the  
docs I was being bad and should change my behavior.


-- 
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
trevor at bluemangolearning.com





More information about the use-livecode mailing list