Csound Csound-dev Csound-tekno Search About

[Csnd-dev] lenarray does not report correct array length for genarray

Date2018-03-23 08:34
Fromjoachim heintz
Subject[Csnd-dev] lenarray does not report correct array length for genarray
when i create an array via genarray, lenarray reports -1 as its length:

  kNix[] genarray 0, 18
  printk2 lenarray(kNix)
  -> -1

although the array created by genarray is correct:
  printk2 kNix[17]
  -> 17

it only works if i init kNix previously:
  kNix[] init 18
  kNix[] genarray 0, 17
  printk2 lenarray(kNix)
  -> 18

i think this is a bug, or am i missing something?

Date2018-03-23 08:46
FromVictor Lazzarini
SubjectRe: [Csnd-dev] lenarray does not report correct array length for genarray
maybe lenarray:k( ) is needed?
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 23 Mar 2018, at 08:34, joachim heintz  wrote:
> 
> when i create an array via genarray, lenarray reports -1 as its length:
> 
> kNix[] genarray 0, 18
> printk2 lenarray(kNix)
> -> -1
> 
> although the array created by genarray is correct:
> printk2 kNix[17]
> -> 17
> 
> it only works if i init kNix previously:
> kNix[] init 18
> kNix[] genarray 0, 17
> printk2 lenarray(kNix)
> -> 18
> 
> i think this is a bug, or am i missing something?
> 

Date2018-03-23 09:21
Fromjoachim heintz
SubjectRe: [Csnd-dev] lenarray does not report correct array length for genarray
that's it - thanks!

one more goal for the i&k team =)

	j



On 23/03/18 09:46, Victor Lazzarini wrote:
> maybe lenarray:k( ) is needed?
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 23 Mar 2018, at 08:34, joachim heintz  wrote:
>>
>> when i create an array via genarray, lenarray reports -1 as its length:
>>
>> kNix[] genarray 0, 18
>> printk2 lenarray(kNix)
>> -> -1
>>
>> although the array created by genarray is correct:
>> printk2 kNix[17]
>> -> 17
>>
>> it only works if i init kNix previously:
>> kNix[] init 18
>> kNix[] genarray 0, 17
>> printk2 lenarray(kNix)
>> -> 18
>>
>> i think this is a bug, or am i missing something?
>>
>> 	joachim