Is there a "continue" for while loops?

Is there any way I can go to the next iteration of a loop? Something
like:

while cond1
if cond2
continue <-----
else

end

I really can’t figure it out.

···


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

Daniel Carrera wrote:

Is there any way I can go to the next iteration of a loop? Something
like:

while cond1
if cond2
continue <-----
else

end

I really can’t figure it out.

From “Ruby in a Nutshell”:

NEXT STATEMENT:
Jumps to the point immediately before the evaluation of a loop’s
conditional. Terminates execution of a block if called within a block
(with yield or call returning nil).

REDO STATEMENT:
Jumps to the point immediately after the evaluation of the loop’s
conditional. Restarts yield or call if called within a block.

···


Jason Voegele
“There is an essential core at the center of each man and woman that
remains unaltered no matter how life’s externals may be transformed
or recombined. But it’s smaller than we think.”
– Gene Wolfe, The Book of the Long Sun

next

···

On Mon, 10 Feb 2003 07:10:24 +0900, Daniel Carrera wrote:

Is there any way I can go to the next iteration of a loop? Something
like:

while cond1
if cond2
continue <-----
else

end

I really can’t figure it out.