Subject: Need help with indexing declared arrays (Lisp)
From: Robert Dodier
Date: Thu, 22 Jan 2004 09:13:46 -0800 (PST)
Hello,
I'm attempting to index multidimensional declared arrays
(as declared with "array(e,10,10,10)" for example) in Lisp.
It seems the way to do this is to use MAREF like this:
(MAREF (TRD-MSYMEVAL |$e| '|$e|) 4 2 3))
However I'm getting stuck on two things. (1) TRD-MSYMEVAL --
the purpose of this is (apparently) to make the array name
evaluate to itself. I can't seem to get it to work as
expected when the expression contains a function argument
(and thus not the name of the original array itself).
(2) I'm having trouble constructing the expression
with the array name concatenated with the indices in such
a way that the result evaluates to the array value.
Sounds easy, doesn't it? Yet I've tried many permutations
and I can get close but can't quite get it. I've grepped
through the source code but all uses of MAREF appear to
use just one index. There must be a standard way to do
this, but I'm stumped.
I need a function to return the value of an arbitrary
array for arbitrary indices. If you have such a thing
I would be very interested.
Regards, & thanks for your help,
Robert Dodier
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/