rpandey@mist.CS.ORST.EDU (Rajeev Pandey) (07/04/89)
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......... Could someone please post some way to do this without going to real ugly code in KCL ? (Am I doing something wrong?) Thanx much, -------- Dept. of Computer Science | Rajeev "Raju" Pandey Computer Science Bldg. 100 | Oregon State University | Internet: rpandey@cs.orst.edu Corvallis, OR 97331-3902 | UUCP: tektronix!orstcs!rpandey (503) 754-3273 U.S.A. | UUCP: hplabs!hp-pcd!orstcs!rpandey -------- Dept. of Computer Science | Rajeev "Raju" Pandey Computer Science Bldg. 100 | Oregon State University | Internet: rpandey@cs.orst.edu Corvallis, OR 97331-3902 | UUCP: tektronix!orstcs!rpandey (503) 754-3273 U.S.A. | UUCP: hplabs!hp-pcd!orstcs!rpandey
jeff@aiai.uucp (Jeff Dalton) (07/06/89)
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......... You'll have to give some more information. What do you do with var in the rest of the function? Does your problem happen only if the function is compiled? I don't have any problem when giving a variable a gensym as it's value (and I do it all the time). So I suspect there's something in the rest of the function that's significant. Jeff Dalton, JANET: J.Dalton@uk.ac.ed AI Applications Institute, ARPA: J.Dalton%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!J.Dalton
ags@mentor.cc.purdue.edu (Dave Seaman) (07/06/89)
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