Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!mentor.cc.purdue.edu!ags From: ags@mentor.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.lisp Subject: Re: Let and Gensym question Message-ID: <3266@mentor.cc.purdue.edu> Date: 5 Jul 89 19:35:49 GMT References: <11486@orstcs.CS.ORST.EDU> Reply-To: ags@mentor.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 46 In article <11486@orstcs.CS.ORST.EDU> rpandey@mist.CS.ORST.EDU (Rajeev Pandey) writes: > > I have this problem that I encountered while using Kyoto Common Lisp. If I > try to use a let and a gensym together like: > > (defun whatever () > (let ((var (gensym))) > : > : > > I get an error (function var is unbound). I do the same thing in Tek Common > Lisp, or Franz Lisp, and I have no problems......... The problem must surely lie in the portion of the code that you left out of your posting. I have two reasons for saying so: 1. I ran the simplest case under KCL and it worked. ------------------------------------------ Script started on Wed Jul 5 14:25:34 1989 % cat whatever.lsp (defun whatever () (let ((var (gensym))) var)) % kcl KCl (Kyoto Common Lisp) June 3, 1987 >(load "whatever") Loading whatever.lsp Finished loading whatever.lsp T >(whatever) #:G823 >(whatever) #:G824 ------------------------------------------ 2. You quoted the message as saying FUNCTION var is unbound, rather than VARIABLE var is unbound. That indicates that the code you left out must be attempting to call var as a function. -- Dave Seaman ags@seaman.cc.purdue.edu