Indexing coll with floats and Integers

pm's icon

I'm looking for a way to store data in coll, and I usually do it with Integers. Since I'm using it to store some cues (1,2,3,4, etc.), I'd like to be able to insert a 1.1 cue. But for indexing data in coll, float are recognized as symbols, so it doesn't allow the same ordering.
Anybody has an hint?
Maybe storing Integers as symbolized float... That seems tricky, so is there a better way?

Peter Castine's icon

A typical technique is to multiply (and round) all your float values by some convenient constant (say, 100.0) and use the resulting integers as coll indices.

The only drawback is that you have to decide in advance what your maximum granularity is going to be.

jvkr's icon

Another solution is to not use the que numbers as indexes, but regard them as names or identifiers that you store with each cue.

pm's icon

Thanks Peter,
I think it's the easiest way to do what I want.