bogs, I'm afraid that doesn't work because "theLine" doesn't refer to each line in the variable tDebits, it refers to the number of lines in the *string literal* "tDebits". Try this:
Code: Select all
put (a,b,c,d,e,f,g) into tDebits
put (a,b,c,d,e,f,g) into tCredits
replace comma with cr in tDebits
replace comma with cr in tCredits
answer tDebits -- a bunch of lines
repeat for each item debitOrCredit in "tDebits,tCredits"
repeat for each line theLine in debitOrCredit
answer theLine -- not a line of data!
end repeat
end repeat
dunbarx, it's Mac OS X. The thing is, once I put the "repeat" inside a "do", the code editor doesn't see the command as "repeat", it sees it as "do", so it doesn't indent. In fact, if you do that, then you have to put the "end repeat" inside a "do" otherwise you get an error.
I'm rethinking my data structure so I don't have to have multiple repeats. The hardest part of this project isn't the coding (LiveCode syntax is pretty damn easy), it's figuring out how to organize the data.