Forums > MaxMSP

Count items in a list

February 27, 2010 | 4:51 pm

Hi, I can’t seem to find out how to count items in a list. I’d like to send a message to an object and have it output the number of items in the list.
I’m trying to avoid externals in this patch.

3 14001 245 should output 3
6 89 22 45 3 55 66 should output 7

Seems like this should be easy…probably n mode or switch on the zl object but I can’t find it.
Thanks in advance.


February 27, 2010 | 5:00 pm

hi there,

try zl len


February 27, 2010 | 5:00 pm

[zl len ]

It’s documented in the xl help file.


February 27, 2010 | 5:04 pm

Exactly what I needed, thanks very much!


Viewing 4 posts - 1 through 4 (of 4 total)