LOOP ... CONTINUE

Michał "phoe" Herda phoe at disroot.org
Wed Mar 24 21:19:17 UTC 2021


The issue is that LOOP-FINISH terminates iteration as a whole, instead
of terminating only the current iteration and continuing from the next one.

There's no equivalent of "continue" in standard CL - you'll either need
an explicit short-form LOOP like (loop (tagbody :start ...)) or to
rewrite the loop to use IF instead, as detailed in another reply.

And, as mentioned, clo-devel is a wrong place to ask. :D

~phoe

On 24.03.2021 22:15, Erik Huelsmann wrote:
> Hi Marco,
>
> Did you intend to send your mail to pro@ -- this being the list to
> discuss the direction the common-lisp.net service takes?
>
> Anyway, you may be looking for "loop-finish"
> http://www.lispworks.com/documentation/HyperSpec/Body/m_loop_f.htm :
> The loop-finish macro can be used lexically within an extended loop
> form to terminate that form ``normally.''
>
> Regards,
>
> Erik.
>
> On Wed, Mar 24, 2021 at 9:27 PM Marco Antoniotti
> <marco.antoniotti at unimib.it> wrote:
>> Hi
>>
>> I was porting some code to CL which has many
>>
>> for .. {
>>   if ... continue;
>>   ...
>> }
>>
>> What is the best way to render this with LOOP? (No ITERATE please.)
>> Must we wrap the LOOP with a TAGBODY?
>>
>> All the best
>>
>> MA
>>
>> --
>> Marco Antoniotti, Associate Professor         tel. +39 - 02 64 48 79 01
>> DISCo, Università Milano Bicocca U14 2043 http://dcb.disco.unimib.it
>> Viale Sarca 336
>> I-20126 Milan (MI) ITALY
>
>



More information about the clo-devel mailing list