Csound Csound-dev Csound-tekno Search About

[Csnd] still i(gkArr[]) problem

Date2014-05-23 23:14
FromTarmo Johannes
Subject[Csnd] still i(gkArr[]) problem

Hi,

 

thanks for fixing bug that did not allow to read value of an global k-array on init time. now

 

idensity = i(gkDensity[0])

works like charm,

 

but strangely if I use an variable in the place of the index

 

ivoice = p4

idensity = i(gkDensity[ivoice])

 

I get an error:

error: Use of i() with expression not permitted on line 145

 

I cannot see the reason.

 

thanks!

tarmo


Date2014-05-23 23:52
FromVictor Lazzarini
SubjectRe: [Csnd] still i(gkArr[]) problem
Looks like the parser treats any other variables inside i( ) as indicative of an expression, which is
now forbidden. I think it’s a bug, it should allow for the type of code you are writing.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 23 May 2014, at 23:14, Tarmo Johannes  wrote:

> Hi,
>  
> thanks for fixing bug that did not allow to read value of an global k-array on init time. now
>  
> idensity =  i(gkDensity[0])
> works like charm,
>  
> but strangely if I use an variable in the place of the index
>  
> ivoice = p4	
> idensity =  i(gkDensity[ivoice])
>  
> I get an error:
> error:  Use of i() with expression not permitted on line 145
>  
> I cannot see the reason.
>  
> thanks!
> tarmo



Date2014-05-24 00:05
FromTarmo Johannes
SubjectRe: [Csnd] still i(gkArr[]) problem
Thaks,

I also filed an issue in github.

tarmo

On Friday 23 May 2014 23:52:51 Victor Lazzarini wrote:
> Looks like the parser treats any other variables inside i( ) as indicative
> of an expression, which is now forbidden. I think it’s a bug, it should
> allow for the type of code you are writing. ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
> 
> On 23 May 2014, at 23:14, Tarmo Johannes  
wrote:
> > Hi,
> > 
> > thanks for fixing bug that did not allow to read value of an global
> > k-array on init time. now
> > 
> > idensity =  i(gkDensity[0])
> > works like charm,
> > 
> > but strangely if I use an variable in the place of the index
> > 
> > ivoice = p4
> > idensity =  i(gkDensity[ivoice])
> > 
> > I get an error:
> > error:  Use of i() with expression not permitted on line 145
> > 
> > I cannot see the reason.
> > 
> > thanks!
> > tarmo
> 
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"



Date2014-05-24 10:31
FromVictor Lazzarini
SubjectRe: [Csnd] still i(gkArr[]) problem
That’s great!
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 24 May 2014, at 00:05, Tarmo Johannes  wrote:

> Thaks,
> 
> I also filed an issue in github.
> 
> tarmo
> 
> On Friday 23 May 2014 23:52:51 Victor Lazzarini wrote:
>> Looks like the parser treats any other variables inside i( ) as indicative
>> of an expression, which is now forbidden. I think it’s a bug, it should
>> allow for the type of code you are writing. ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>> 
>> On 23 May 2014, at 23:14, Tarmo Johannes  
> wrote:
>>> Hi,
>>> 
>>> thanks for fixing bug that did not allow to read value of an global
>>> k-array on init time. now
>>> 
>>> idensity =  i(gkDensity[0])
>>> works like charm,
>>> 
>>> but strangely if I use an variable in the place of the index
>>> 
>>> ivoice = p4
>>> idensity =  i(gkDensity[ivoice])
>>> 
>>> I get an error:
>>> error:  Use of i() with expression not permitted on line 145
>>> 
>>> I cannot see the reason.
>>> 
>>> thanks!
>>> tarmo
>> 
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
> 
> 
> 
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
>