[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

T = NIL



    Date: Wed, 30 Mar 88 13:20:56 est
    From: Michael S. Kelsen <kelsen@ge-dab.ge.com>

	    Command: t
	    NIL

This happened once here, too.  It can result in some strange behavior by
the system.

	    1) What could have caused this to happen?

The SET function (as opposed to SETQ) doesn't check whether a symbol is
declared as a constant, so it lets you do (SET T NIL).

Command: (defconstant frob 3)
FROB
Command: (setq frob 4)
1Error: Attempt to set FROB, which is a constant declared with DEFCONSTANT.

SI:*EVAL
0   Arg 0 (SYS:FORM): (SETQ FROB 4)
   Arg 1 (SI:ENV): NIL
1   --Defaulted args:--
0   Arg 2 (SI:HOOK): NIL
s-A, <Abort>:  Return to Lisp Top Level in Dynamic Lisp Listener 1
s-B:           Restart process Dynamic Lisp Listener 1
-> :Abort
1Return to Lisp Top Level in Dynamic Lisp Listener 1
0Back to Lisp Top Level in Dynamic Lisp Listener 1.

Command: (set 'frob 4)
4
Command: frob
4

They appear to have fixed the particular case of setting T in 7.2 by
putting its value cell on a write-protected memory page.  In the Beta
test version, at least, SET still has the bug, so you can SET other 

	    2) How can I fix the problem once it occurs (short of cold booting)?

(SET T 'T) should do it.

By the way, I miss the cute MacLisp error messages for trying to set T
or NIL: "Veritas aeterna: don't SETQ T", and "Nihilem ex nihil: don't
SETQ NIL."

                                                barmar