[coll] - "bang to output current entry" does not what is expected

Fons Mans's icon

In the [coll] help is stated that a 'bang' is supposed to "output current entry". In practice the bang outputs the entry and cycles to the next entry, making it functionally the same as the 'next' message. I get this unexpected behavior in Max 8 and Max 9. I've attached the [coll] help example from the 'queries' tab just in case.

Does anyone know why 'bang' goes to the next entry instead of the documented and expected behavior: "bang to output current entry"?

coll_example.maxpat
Max Patch

Source Audio's icon

bang allways cycled through coll indexes

from current one.

unless goto nn is called before.

which makes the difference.

same as if you use end message.

or end, bang

all is visible in help and reference files.

Fons Mans's icon

I understand that the behavior was always like this. You're right about the two cases. I think either:

  • the help file should be updated to contain the same information as the reference: "Same effect as the next message" instead of the current "bang to output current entry"

  • the bang behavior should behave as the help file states and just output current entry, but this would probably cause a lot of incompatibility issues

I'd like the function of a bang or another message just outputting the data and index of the current pointer, as it seems there is no way of doing this at the moment without passing an index.

Source Audio's icon

For me the main thing is to define what is current entry.

It is not last recalled one, and can be only set using end or goto message.

otherwise bang triggers next higher index.

another strange one is this goto message.

if you call goto 1 and there is no index 1,

then first coll index gets selected.

no matter if index is numeric or symbol.

but goto 2 won't trigger 2nd index ....

you will find many examples in Max documentation that you may want to update, fix

or precise, even remove wrong infos etc.

I guess that is result of that many objects and long existance of max with that many versions.

same applies to leftowers in Max code itself.

Fons Mans's icon

Thanks for your brief explanation with examples. I will find a workaround for my case :)

All the best!