[Oberon] How to mimic an associative array
Duke Normandin
dukeofperl at ml1.net
Wed Dec 1 18:23:07 CET 2010
Hello list...
Given that Oberon-2 does not natively support associative arrays (aka
hash; map - in other languages), I need to come up with a tailor-made
equivalent. Still very much the Oberon/Modula/Pascal noob, I thinking
that maybe a Record like:
TYPE
myHash = RECORD
key : ARRAY <someLength> OF CHAR;
value : ARRAY <someLength> OF CHAR;
END;
Would that work? Is there a better solution? I'm going to test the
above, of course, but I just thought that I'd get your input, before
spinning my wheels too much. There tires/tyres and head are already
bald enough. :)
--
Duke
More information about the Oberon
mailing list