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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

joachim-3
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
Reply | Threaded
Open this post in threaded view
|

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

Victor Lazzarini-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

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

joachim-3
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 <[hidden email]> 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
>