[PD] Question on getting the amount of values in a table and setting table to zero
IOhannes m zmölnig
zmoelnig at iem.at
Sat Oct 6 07:33:25 CEST 2012
On 10/04/2012 05:47 PM, Rick T wrote:
> Greetings All
>
> 1) I'm trying to find a way to get the total amount of values in a
> table. I found arraysize but that doesn't seem to give me the correct
> output
>
> Example:
> If I create a table with "; arrayx 0 .1 .3 .5 .3 .1"
you are not creating a table with this.
what you do is to set the first 5 elements of an existing table,
whatever it's length is.
in order to count the elements you just set you could use [list length].
[0 .1 .3 .5 .3 .1(
|
[list length]
|
[6\
|
[- 1]
|
[5\ <-- tadaa!
if you want to resize a table, use the "resize" message.
[resize 19(
|
[s arrayx]
>
> 2) I'm also trying to set all values in array to zero with out having to
> zero each index.
>
use the "const" message.
[const 0(
|
[s arrayx]
fgmasdr
IOhannes
More information about the Pd-list
mailing list