It's a variable name to hold the data for each line in turn as it loops through the text.Daross wrote:A question; what is aLine?
Take a simpler example where
Code: Select all
repeat for each line aLine in tText
put item 2 of aLine & cr after field "DestinationListField"
end repeat
Code: Select all
Line 1,Cat,Some more data
Line 2,Dog,Extra info
Line 3,Fish,Who knows what else?
Line 4,Wildebeest,Hey - isn't that the same as a gnu?
"repeat for each line [[and we're going to have a variable name here that we have called "aLine" to hold the value concerned each time we go through the loop, otherwise how will our routine know what to do with any of the data?]] in tText"
When the loop is started, the first time around it will put "Line 1,Cat,Some more data" into the variable aLine. Then item 2 of aLine will be "Cat" and it will put that into the destination field. Next time around the loop it will put "Line 2,Dog,Extra info" into aLine, and put item 2: "Dog" on the next line after the destination field. etc. etc.
You can loop though all sorts of containers in the same way, such as
Code: Select all
repeat for each item theItemVariable in aLine
I hope that makes it clearer.