Csound Csound-dev Csound-tekno Search About

Re: if-then-else bug in csound5.00

Date2006-02-05 20:40
FromKlaus Schröder
SubjectRe: if-then-else bug in csound5.00
Hi Istvan,

thank you very much for your prompt reply. ithen solves my problem 
perfectly. Apparently ithen was not in Csound 4.23 (syntax error) and it has 
not found its way into the current manual.

Regarding the \ in prints: Csound 4.23 did not work with a single backslash 
but of course two backslashes would have been sufficient and Csound 5 seems 
to be quite tolerant as to the number of backslahses. It accepts 1 to3 
backslahses, but not  more.

- Klaus


----- Original Message ----- 
From: "Istvan Varga" 
To: 
Sent: Sunday, February 05, 2006 8:33 PM
Subject: Re: [Csnd] if-then-else bug in csound5.00


> On Sunday 05 February 2006 20:12, Klaus Schröder wrote:
>
>> The if .. then .. else .. endif  code does not work as expected. In
>> Csound5.0 an else block following immediately after the if block is 
>> executed
>> even if the if-condition is true. The if .. then .. elseif .. endif code
>> seems to work correctly. This behavior is demonstrated  by the attached
>> csd-file:
>
> The else branch is always executed at i-time. I do not recall exactly why
> this limitation exists (maybe there would be "not initialised" errors in
> some non-obvious cases), but for an i-time only conditional you can use
> 'ithen' instead of 'then'.
>
> By the way, why do you use \\\n in the messages with three \ characters ?
> It is not related to the error, but a simple \n would be sufficient.
> -- 
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk