[PD] [list length] counts unusual
Frank Barknecht
fbar at footils.org
Tue Oct 24 13:18:51 CEST 2006
Hi,
I just found out that the new [list length] from Pd-0.40 counts the
length of messages slightly unusual. Counting the elements in a
meta-message like "walk the dog" will leave out the first element,
"walk" in the example, and give a result of 2. The proper list
message "list walk the dog" however will count as 3.
This gets even more confusing with the other example in the
list-help.pd file: "1 x y" has a list-length of 3, however "x 1 y"
only has a list-length of 2.
And it gets quite nasty with an argument-less meta-message like "set",
which has a list-length of 0 just like the "real" empty list: a
"bang"-message.
I can see the logic behind this (counting only the arguments to a
message but not the selector). But as all other [list] objects
besides [list trim] automatically convert incoming meta-messages to
list-messages I think I would expect the same to happen for [list
length].
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list