[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a listener that won't listen
- To: firstname.lastname@example.org (Martin Stanley)
- Subject: Re: a listener that won't listen
- From: email@example.com (Bill St. Clair)
- Date: Tue, 31 Jan 1995 11:24:52 -0500
- Cc: firstname.lastname@example.org (Bill St. Clair), email@example.com
- Sender: firstname.lastname@example.org
At 10:08 PM 1/30/95, Martin Stanley wrote:
>What happens if (toplevel) is not executed? I fixed my code to do a
>set-toplevel, but did not do this and it seemed to work.
(toplevel) is basically a throw to a loop in the MCL kernel.
If your top level function is not itself a loop, then (%set-toplevel ...)
alone will work, since your code will return to the kernel loop.
MCL's toplevel-loop fucntion IS a loop, hence to change the toplevel
once you've entered toplevel-loop, you MUST execute (toplevel).
To clarify, the MCL kernel contains a loop that is effectively:
(let ((cmain (%set-toplevel)))
And the toplevel function could be defined as:
(defun toplevel ()
(throw :toplevel nil))