Colet Patrice
----- Mail original -----
De: "Rick T" ratulloch@gmail.com À: "PD List" pd-list@iem.at Envoyé: Jeudi 4 Octobre 2012 17:47:57 Objet: [PD] Question on getting the amount of values in a table and setting table to zero
Greetings All
- 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" I'm trying to get the output to be 5 since there are 5 values in it.
if you set manually array values, maybe [list-abs/list-len] is the answer...
something like this:
[.1 .3 .5 .3 .1( | [list] | [t a a] | | | [list length] | | | [;arrayx resize $1( | [list prepend 0] | [list trim] | [s arrayx]
- I'm also trying to set all values in array to zero with out having
to zero each index.
Example If I create a table with "; arrayx 0 .1 .3 .5 .3 .1" is there an option to set all indexes values back to zero (or set the entire array back to zero) without creating another object like this"; arrayx 0 0 0 0 0 0"
[;arrayx const 0(