As i am a beginner ,i don’t know how to skip one iteration in Loop and continue the next iteration part? Also i need to exit from my loop based on some calculated conditions…How can i do this? I need to write this code inside a Report. I tried the 'exit ’ keyword but it stopped that session itself not the LOOP.Please help me.
There is no keyword to skip one iteration of a loop. You’ll have to figure out a different way to only execute the code in the loop if some condition is true. Hey that sounded like a hint didn’t it [Y]
IF NOT (SkipCondition) THEN BEGIN //Whatever reason you want to skip
//Process
END;
IF (ExitTest) THEN EDIT: //Test your condition to completely leave the loop
ExitCondition := TRUE;
UNTIL (ExitCondition)
You can use a while, repeat, whichever… but you need to encase the code you want to execute one way or another and not execute it based off of a condition.