From: Thomas Goodsell <thom.goodsell@us...> - 2000-04-19 21:23:54
> Which works fine, until I try to set left1's parent node to root.
> That's how the tree is organized, and I know it's indirect
> self-reference, but shouldn't CLISP be able to handle it?
CLISP can handle it. In a sense, the "problem" isn't with your code, nor with
CLISP, but with the standard. What's happening is that CLISP is trying to
print the result of what you've done. Something to the effect of:
#S(TREENODE :LEFT NIL :RIGHT NIL :PARENT #S(TREENODE
:LEFT #S(TREENODE :LEFT NIL
:PARENT #S(TREENODE . .
and so on, ad infinitum. As was mentioned earlier, check out *print-circle*
for a way to get more intelligent behavior:
#1=#S(TREENODE :LEFT NIL :RIGHT NIL :PARENT #S(TREENODE
-----BEGIN GEEK CODE BLOCK-----
GAT d s:+ a- C++$ ULSI++$ P--- L++$ E+>+++ W++ N+ o? K- w--(-) O?
M+ V PS++(--) PE+(--) Y+>++ PGP->+ t+ 5++ X+ R tv- b+>+++ DI+ D---(+)
G e+++ h---() r+++ y+++
------END GEEK CODE BLOCK------
Get free email and a permanent address at http://www.amexmail.com/?A=1