Coll -- output if no index found

Anthony Prechtl's icon

I am trying to figure out how to get a bang or any other type of message from [coll] if you try to retrieve data at a certain index, but it does not have any data for that index. By itself, [coll] will simply do nothing if you send it an index value for which it has no data, but I need some way of knowing that it couldn't find any data for that index. Any suggestions would be greatly appreciated!

Max Patch
Copy patch and select New From Clipboard in Max.

I tried to make an example patch (below). In this example, I want it to print the stored values, or "not found" if it doesn't find any value at the queried index.

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's a solution using onebang:

Anthony Prechtl's icon

Thanks, that's perfect, and very simple!

musinou's icon

CHRIS MUIR, that is neat.