Csound Csound-dev Csound-tekno Search About

[Cs-dev] Else blocks

Date2005-08-04 16:20
FromSteven Yi
Subject[Cs-dev] Else blocks
AttachmentsNone  

Date2005-08-04 17:14
FromIstvan Varga
SubjectRe: [Cs-dev] Else blocks
Steven Yi wrote:

> And in the example, if you change the last elseif statement to an
> else, the UDO will always return -1.
> 
> Any chance to take a look would be appreciated!

The else branch is always executed at i-time, as a result of a fix by
Matt Ingalls that attempted to work around the problem of the else branch
sometimes not being called at i-time. For i-time only code, you can use
'ithen' instead of 'then': this will do what you expect at init time,
however, it will always execute the "else" branch at performance time
and never any of the "if" or "elseif" branches.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-04 17:28
FromSteven Yi
SubjectRe: [Cs-dev] Else blocks
AttachmentsNone  

Date2005-08-24 00:01
Frommatt
SubjectRe: [Cs-dev] Else blocks
that does sound like a bug in the 'else' opcode
if the conditional uses all i-rate values,
  it is supposed to act like an 'ithen'

-m@
________________________
           matt  ingalls
http://sfsound.org/matt.html

On Aug 4, 2005, at 9:14 AM, Istvan Varga wrote:

> Steven Yi wrote:
>
>
>> And in the example, if you change the last elseif statement to an
>> else, the UDO will always return -1.
>> Any chance to take a look would be appreciated!
>>
>
> The else branch is always executed at i-time, as a result of a fix by
> Matt Ingalls that attempted to work around the problem of the else  
> branch
> sometimes not being called at i-time. For i-time only code, you can  
> use
> 'ithen' instead of 'then': this will do what you expect at init time,
> however, it will always execute the "else" branch at performance time
> and never any of the "if" or "elseif" branches.
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *  
> Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/ 
> bsce5sf
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-24 00:14
FromMatt Ingalls
SubjectRe: [Cs-dev] Else blocks
hey steven,

i took a closer look at this and it is NOT a bug!

the unexpected result we are seeing is due to pfields
in the conditional.  if you take away the pfields,
it works as expected.  i guess it's because pfields cannot be "inlined"
or something, and so the conditional is not flagged as i-rate.

and so using 'ithen' is the proper thing to do in this instance.

Matt;
________________________
           matt  ingalls
http://sonomatics.com

On Aug 4, 2005, at 9:28 AM, Steven Yi wrote:

> Hi Istvan,
>
> Thanks for that explanation.  That is incredibly strange behavior, but
> at least the workaround is perfectly simple.  Thanks!
>
> steven
>
>
> On 8/4/05, Istvan Varga  wrote:
>
>> Steven Yi wrote:
>>
>>
>>> And in the example, if you change the last elseif statement to an
>>> else, the UDO will always return -1.
>>>
>>> Any chance to take a look would be appreciated!
>>>
>>
>> The else branch is always executed at i-time, as a result of a fix by
>> Matt Ingalls that attempted to work around the problem of the else  
>> branch
>> sometimes not being called at i-time. For i-time only code, you  
>> can use
>> 'ithen' instead of 'then': this will do what you expect at init time,
>> however, it will always execute the "else" branch at performance time
>> and never any of the "if" or "elseif" branches.
>>
>>
>> -------------------------------------------------------
>> SF.Net email is Sponsored by the Better Software Conference & EXPO
>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
>> Practices
>> Agile & Plan-Driven Development * Managing Projects & Teams *  
>> Testing & QA
>> Security * Process Improvement & Measurement * http://www.sqe.com/ 
>> bsce5sf
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *  
> Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/ 
> bsce5sf
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net