[Oberon] How to mimic an associative array

Jan Verhoeven jan at verhoeven272.nl
Thu Dec 2 18:49:00 CET 2010


On Thursday 02 December 2010 18:36:25 Duke Normandin wrote:

> Not quite! I'm writing a generic CGI library/module. This module
> should import/implement associative arrays so that _any_ QUERY_STRING
> content can be processed.

Try assembler. Not a language by Wirth. They require lots of thinking 
and decisions making.

I can do it. Since the number of CGI env vars is finite (and limited) 
just assing an array of record. top link a name to an index and cast 
the lot in a function or module.
If you want to access the content, issue a command similar to

	newCont := PayLoad (LookupFunc (CgiEnvVar))

In which you use LookupFunc as the interface between the perl thingy and 
the data.

> My various CGI scripts will then IMPORT the CGI module which will
> "export" certain procedures to "process" QUERY_STRING, PATH_INFO AND
> STDIN.

Let's hope Niklaus stays alive for quite some time. The other dead may 
be woken up by his rolling over.
Why not make one big universla program that does it all?

> The quick and dirty, are _still_ around; still being developed; still
> very useful. :) Have a look at CPAN: http://www.cpan.org/

Most internet people have a strong tendency to embrace all quick and 
dirty things. :o)

> I'm trying to adapt O2 to a venue that has traditionally been serviced
> by interpreted scripting tools. 

It is possible. But it rquires a fairly high degree of data abstraction. 
Given that, it is possible. But it is complicated. Overly complicated. 
And our Grand Master does not like complex solutions. For a reason.

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl



More information about the Oberon mailing list