gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] (random tester) Error in FUNCALL [or a callee]: Caught f


From: Paul F. Dietz
Subject: Re: [Gcl-devel] (random tester) Error in FUNCALL [or a callee]: Caught fatal error [memory may be damaged]
Date: Mon, 01 Dec 2003 19:44:57 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Camm Maguire wrote:
Greetings, and thanks for the pointer!

Is the example below from the spec?  Why is *y* a special?  Shouldn't
that be *x*?  In general, do lisp programmers think of specials as
stack allocated globals which are restored on any possibly non-local
exit from the context frame establishing the binding?


Oops, should have been *y*.

Yes, that's how I think of them.  This is true even with closures:

   (let ((fn (let ((*x* 1))
                (declare (special *x*))
                #'(lambda () *x*))))
      (let ((*x* 2))
        (declare (special *x*))
        (funcall fn)))

should return 2, not 1.

        Paul

                





reply via email to

[Prev in Thread] Current Thread [Next in Thread]