[Oberon] How to mimic an associative array

Yaroslav Romanchenko tobject at bk.ru
Fri Dec 3 19:05:37 CET 2010

> WoW! I suspect that the code Active Oberon specific, correct? Can the
> same be done in plain Oberon-2? The "context" thing is what I'm
> thinking about.
Context is a simply holder for input/output streams.

> I have a confession to make - I may not have explained properly the
> context in which I want to use this "associative" array, hash,
> table,
> dictionary - whatever...
I've just proposed "simple" implementation with known limitations.
You may imlement what you'll decide.

> The programmer would know in
> advance that the form contains fields for "last_name",
> "first_name",
> which are strings; and "age" (integer); "salary" (real).
> So he could
> set up his CGI "manipulation" procedures with the correct data-types
> _for each script_ every time.
Take a look to Types.Mod in Aos. It's like to implemetation of generic type data holder. With behaviour like "untyped" data type in script languages.
It suitable for type of value field in associative array. 

Cheers, SAGE

More information about the Oberon mailing list