From: Thomas A. Russ
Subject: Re: lisp equivalent to c++ continue
Date: 
Message-ID: <ymipsqd2r50.fsf@sevak.isi.edu>
retupmoca <·········@dev.null> writes:

Oops.  Previous reply sent prematurely.

> What is the lisp equivalent to the following c++:
> 
> for(;;)
> {
>    continue;
>    break;    // will never get reached
> }
> 
> More specifically, what is the lisp translation of the continue keyword 
> above?

Not directly, but you can do that by adding some block structure forms:

(loop
    (block continue
      ...
      (return-from continue)
      (loop-finish))   ;;  similar to break.  Executes loop finally clause
                       ;;  if you don't want the finally to execute you 
	               ;;  would use (return) instead.
   )

Note that you don't want to use the LOOP "named" option, since that
would cause the return to exit the entire LOOP.


> Should I be coding in a different way that doesn't require this keyword?

Maybe.  Depends on what you are trying to do.

-- 
Thomas A. Russ,  USC/Information Sciences Institute