[PD] Associative list

Chris McCormick chris at mccormick.cx
Tue Mar 25 12:29:58 CET 2008


Hello,

Just for kicks I implemented a sort of primitive associative array [1]
(also called a 'map' or 'hash' in some languages, depending on the
implementation) in pure Pd:

<http://mccormick.cx/viewcvs/*checkout*/s-abstractions/s-map.pd?root=svn>
<http://mccormick.cx/viewcvs/*checkout*/s-abstractions/s-map-help.pd?root=svn>

It maps symbols/floats to lists. So you can enter a bunch of lists into
it and the first element of each list is the key and the rest of the
list is the value. You can recall values (lists) by their key.

Don't look at the internals or your eyeballs might explode.

Hmmm, I wonder if this could be used with SSSAD to make some kind of
pure Pd pool/memento replacement? Maybe I'm getting ahead of myself.

Best,

Chris.

[1] http://www.wikipedia.org/wiki/Associative_array

-------------------
http://mccormick.cx




More information about the Pd-list mailing list