Does anyone have any idea what the function g-l-p of Zetalisp does.
Also what is the corresponding counterpart in Common Lisp & Zeta Lisp.
Tushar Saxena
······@cs.albany.edu
In article <····@odin.albany.edu> ······@cs.albany.edu (Tushar Saxena) wrote:
>
> Does anyone have any idea what the function g-l-p of Zetalisp does.
> Also what is the corresponding counterpart in Common Lisp & Zeta Lisp.
(Well the corresponding counterpart in Zetalisp is g-l-p, of course!)
Given an array of type ART-Q-LIST, G-L-P would return a pointer to just
after the array header. This pointer would have its type-bits set to CONS.
An ART-Q-LIST array was an array of boxed storage where the CDRcodes of
each cell were guaranteed to be CDR-NEXT or CDR-NIL (meaning the CDR value
was the next adjascent word rather than the next word being a pointer to
the value). This means that if you faked up a CONS-pointer to the first
cell of the array, the array would look like a list. It's kind of like
making an indirect array (the two arrays share the same addresses in
memory) but one of the arrays is really a list, not an array at all.
Since Common Lisp doesn't have CDR codes, there is no equivalent to this.
But if you don't care about efficiency, (COERCE 'LIST the-array) might be a
replacement for G-L-P. But this won't work if the code you're porting does
any descructive operations on the CARs of the conses in the returned list:
it would be expecting the underlying array to be modified as well.
Aaaah, the good old days...
-- Jamie