Subject: [clisp-list] evil behavior

From: Thomas Goodsell <[email-masked]>
Date: 19 Apr 00 17:16:20 EDT

> 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
                                                      :RIGHT 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
                                               :LEFT #1
                                               :RIGHT NIL                     
                         
                                               :PARENT NIL))

Thom

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
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