SRL Archive - OSR Help

Return to the start of a repeat .. until -


RISK

2011-01-11 09:01:32

I remember there being a way to "Force" return to the start of a repeat without it having to go through all of the motions of the rest of the repeat .. until. Does anyone recall what it is?

Thank you in advance.

bugger0001

2011-01-11 09:10:34

Continue;
is the way to go ;)

EDIT: a simple example too
repeat
Inc(i);
if i = 3 then Continue;
Writeln(i);
until i >= 5;

Outputs: 1, 2, 4, 5

RISK

2011-01-11 09:13:10

Really? I thought "Continue;" was just another way to break out of a repeat .. until.

Thank you, Bugger0001. I really appreciate the help!

From: bugger0001
Continue;
is the way to go ;)

BraK

2011-01-11 09:45:59

Break; Breaks out of loops Continue; returns to the beginning of the Loop.

~BraK