[PD] [list length] counts unusual

Hans-Christoph Steiner hans at eds.org
Fri Oct 27 06:25:27 CEST 2006

On Oct 24, 2006, at 7:18 AM, Frank Barknecht wrote:

> 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].

I think this logic makes sense, but I haven't played with it yet.



News is what people want to keep hidden and everything else is  
publicity.          - Bill Moyers

More information about the Pd-list mailing list