| Enough theory by now...Look at this example:
what the code should do:
if (...) then do (...)
else if (...) then do (...)
else do (...)
(continue)
To do it with CsoundĀ“s current sintax you must do tricky jumps:
if (...) goto label1:goto label2
label1:
(...)
goto continue
label2:
if (...) goto label3:goto label4
label3:
(...)
goto continue
label4:
(...)
continue:
(...)
It works of course but it is very innelegant. And of course this makes sr=kr
necessary. Who prefers this sintax? As long as they are if... statements for variables
and conditional jumps we should have if... statements for blocks of code. And all sort
of conditionals should be available at a rate as well.
Josep M Comajuncosas
Dr J.Stevenson's research assistant wrote:
> >I don't see too much wrong with gotos as long as they are used correctly to
> I agree, but GOTOs ( from experience of translating BASIC->C ) allow to much
>
> freedom to deviate from a rational ( structured ) program flow which is readable
>
> for others ( cleaning up spag code is much akin to programming in C64 ML IMHO
|