Getting a symbol index out of the 2nd outlet of coll.

    May 08 2010 | 9:03 pm
    Hi all,
    I have question about coll that has been bugging me for a while and can find no other reference to it in existing posts. In my patch I am using a coll which can be indexed by either an integer or symbol, as follows:
    1 mdto,; 2 iogk,; 3 sctq,; 4 nkgk,;
    The issue is that I want to be able to index the coll using an integer and get the associated symbol index out of the second outlet. The description of the outlet says that it can output the "Number or symbol associated with data", but I can only seem to get it to do the former. Even when indexing with the symbol itself, only the integer comes out. Perhaps there is some function I am missing?
    Of course, I could additionally include the symbol as data in the coll, or some other type of workaround, but it seems a bit unwieldy.
    Cheers for any insights...

    • May 09 2010 | 11:06 am
      think u will have to work around
      AFAIK when using int + symbol as index, the int supersedes symbol on output. or u could have 2 colls... one with int, data; --- the other with int, symbol;
    • May 09 2010 | 12:53 pm
      Why not just modify the way you're formatting the data for coll so it's like this:
      1, mdto; .......etc...
      Then just [zl slice 1 ] the output of the first coll outlet. Zl rather than unpack because then you can still have an arbitrarily long list of data, and the first item is always the "symbol index".