Csound Csound-dev Csound-tekno Search About

[Csnd-dev] should we have "break" inside a for-loop?

Date2025-09-27 01:01
Fromjoachim heintz
Subject[Csnd-dev] should we have "break" inside a for-loop?
i think this is the classical case to leave a loop like
instr 1
   for i in [1 ... 10] do
     if i == 3 then
       break
     endif
   od
endin

currently we have igoto and label for this case --- possible but a bit 
awkward.

would it be good to implement "break"?

Date2025-09-27 01:12
FromDave Seidel
SubjectRe: [Csnd-dev] should we have "break" inside a for-loop?
+1

On Fri, Sep 26, 2025, 8:01 PM joachim heintz <jh@joachimheintz.de> wrote:
i think this is the classical case to leave a loop like
instr 1
   for i in [1 ... 10] do
     if i == 3 then
       break
     endif
   od
endin

currently we have igoto and label for this case --- possible but a bit
awkward.

would it be good to implement "break"?

Date2025-09-27 01:28
FromSteven Yi
SubjectRe: [Csnd-dev] should we have "break" inside a for-loop?
Seems reasonable to me.

On Fri, Sep 26, 2025 at 8:01 PM joachim heintz  wrote:
>
> i think this is the classical case to leave a loop like
> instr 1
>    for i in [1 ... 10] do
>      if i == 3 then
>        break
>      endif
>    od
> endin
>
> currently we have igoto and label for this case --- possible but a bit
> awkward.
>
> would it be good to implement "break"?

Date2025-09-27 08:23
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] should we have "break" inside a for-loop?
To me too, but the trouble is who is going to write the code? I like all the suggestions etc but we're quite limited in what we can do at the moment.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 27 Sep 2025, at 01:28, Steven Yi  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> Seems reasonable to me.
> 
>> On Fri, Sep 26, 2025 at 8:01 PM joachim heintz  wrote:
>> 
>> i think this is the classical case to leave a loop like
>> instr 1
>>   for i in [1 ... 10] do
>>     if i == 3 then
>>       break
>>     endif
>>   od
>> endin
>> 
>> currently we have igoto and label for this case --- possible but a bit
>> awkward.
>> 
>> would it be good to implement "break"?

Date2025-09-27 08:41
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] should we have "break" inside a for-loop?
I'll volunteer, no worries

On Sat, 27 Sept 2025 at 10:23, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
To me too, but the trouble is who is going to write the code? I like all the suggestions etc but we're quite limited in what we can do at the moment.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 27 Sep 2025, at 01:28, Steven Yi <stevenyi@gmail.com> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Seems reasonable to me.
>
>> On Fri, Sep 26, 2025 at 8:01 PM joachim heintz <jh@joachimheintz.de> wrote:
>>
>> i think this is the classical case to leave a loop like
>> instr 1
>>   for i in [1 ... 10] do
>>     if i == 3 then
>>       break
>>     endif
>>   od
>> endin
>>
>> currently we have igoto and label for this case --- possible but a bit
>> awkward.
>>
>> would it be good to implement "break"?

Date2025-09-27 08:57
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] should we have "break" inside a for-loop?
That's great, thanks. I don't really know enough myself to do anything like that.
Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Sep 2025, at 08:42, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:


I'll volunteer, no worries

On Sat, 27 Sept 2025 at 10:23, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
To me too, but the trouble is who is going to write the code? I like all the suggestions etc but we're quite limited in what we can do at the moment.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 27 Sep 2025, at 01:28, Steven Yi <stevenyi@gmail.com> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Seems reasonable to me.
>
>> On Fri, Sep 26, 2025 at 8:01 PM joachim heintz <jh@joachimheintz.de> wrote:
>>
>> i think this is the classical case to leave a loop like
>> instr 1
>>   for i in [1 ... 10] do
>>     if i == 3 then
>>       break
>>     endif
>>   od
>> endin
>>
>> currently we have igoto and label for this case --- possible but a bit
>> awkward.
>>
>> would it be good to implement "break"?