On Jan 20, 2006, at 21:34, Klaas-Jan Stol wrote:
Hi,
I tried to index aggregates using several types of keys (that is,
several types of values), and it seems only string and integer values
can be used as keys. A quick look at the source in
compilers/imcc/symreg.c confirms this, there is no case for 'N' values
(and a test makes Parrot say build_key: unknown set).
As already expressed by Matt using floats as keys is a PITA. But you
can use arbitrary PMCs including Floats as a key by providing
appropriate compare and hash methods. See the new_*_x functions in
src/hash.c for examples to construct hashes with various key/value
types.
leo