Dear All,
I have got a repeat until loop and I need to stop a particular cycle and go to the next loop in certain conditions. The only method which I've found out so far is to use the begin...end within the repeat until but I'm looking for a cleaner way. Does anyone know of an alternative?
Regards,
Steve
0
Comments
You can do something like
REPEAT
UNTIL ((NEXT = 0) OR (MyBoolean = FALSE))
But keep in mind that the last NEXT will be called before exiting and the pointer will move to the next record.
What exactly do you want to do?
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
Are you expection ???
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Yes.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
If I understand you correctly, you are looking to break out of a particular cycle thru the Repeat..Until loop but continue the loop with the next value. Not break entirely out of the loop.
But then I could be wrong... :-$
do u want a code like breaking the whole loop or like skip the particular record in that loop?
REPEAT
<SOME CODE HERE>
IF Condition THEN
EXIT;
<SOME CODE HERE>
UNTIL rec.NEXT=0;