[PD] [list length] counts unusual

Mathieu Bouchard matju at artengine.ca
Tue Oct 24 14:35:41 CEST 2006


On Tue, 24 Oct 2006, Frank Barknecht wrote:

> 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. I can see the logic 
> behind this (counting only the arguments to a message but not the 
> selector).

This seems consistent with how messageboxes handle it. (This doesn't mean 
that it's a good idea)

> 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 consider this to be a bug in pd. In the meanwhile, use a dummy [list] 
before every use of [list length] in order to force a cast.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list