repeat loop - exit to top
Posted: Sun Feb 22, 2015 7:30 pm
Hey all,
I have a repeat loop. There are two conditions I want to check for - if both are true I don't want to execute any code below the if condition, I just want to loop back to top increment my tIndex by 1 and then work my way down the loop if the condition is not met. I know I can block the code in an if -- end if, however I was looking at the way live code works - and came across the exit to top. Is that what it's not used for?
Thanks
Jalz
I have a repeat loop. There are two conditions I want to check for - if both are true I don't want to execute any code below the if condition, I just want to loop back to top increment my tIndex by 1 and then work my way down the loop if the condition is not met. I know I can block the code in an if -- end if, however I was looking at the way live code works - and came across the exit to top. Is that what it's not used for?
Thanks
Jalz
Code: Select all
repeat for each key tIndex in tGrid
-- if its estimate and optional(label 4) don't continue with the code to go down the loop but reiterate after incrementing
if (tHeader["Label"][1] is "Estimate") and (tGrid[tIndex]["Label 4"] is true) then exit to top
put "PrintLines" & tIndex into tPrintLines
end repeat