From: Young-Jin Lee
Subject: Novice question on let function.
Date: 
Message-ID: <4GiR5.3241$4h2.55129@vixen.cso.uiuc.edu>
Hi, I have difficulty reading some lisp source code.
What is the (let (var1 var2 var3) ....) means?
I looks like to initialize each variables to nil, but I couldn't find any
lisp reference for (let (var1 var2 var3) ...).
All I found was let ({var | (var value)}*) {declaration}* {form}*.

Thanks in advance.

From: Barry Margolin
Subject: Re: Novice question on let function.
Date: 
Message-ID: <7YiR5.80$Pr6.1190@burlma1-snr2>
In article <····················@vixen.cso.uiuc.edu>,
Young-Jin Lee <······@uiuc.edu> wrote:
>Hi, I have difficulty reading some lisp source code.
>What is the (let (var1 var2 var3) ....) means?
>I looks like to initialize each variables to nil, but I couldn't find any
>lisp reference for (let (var1 var2 var3) ...).
>All I found was let ({var | (var value)}*) {declaration}* {form}*.

It's right there in the syntax that you quoted.  {var | (var value)}* means
a sequence of either "var" or "(var value)".  In your example, they all
match the "var" option.


-- 
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Kent M Pitman
Subject: Re: Novice question on let function.
Date: 
Message-ID: <sfw3dgqi2xr.fsf@world.std.com>
Barry Margolin <······@genuity.net> writes:

> In article <····················@vixen.cso.uiuc.edu>,
> Young-Jin Lee <······@uiuc.edu> wrote:
> >Hi, I have difficulty reading some lisp source code.
> >What is the (let (var1 var2 var3) ....) means?
> >I looks like to initialize each variables to nil, but I couldn't find any
> >lisp reference for (let (var1 var2 var3) ...).
> >All I found was let ({var | (var value)}*) {declaration}* {form}*.
> 
> It's right there in the syntax that you quoted.  {var | (var value)}* means
> a sequence of either "var" or "(var value)".  In your example, they all
> match the "var" option.

But stylistically, I and many others recommend you use
 (LET ((X NIL)) ...)
to initialize X to NIL, but use
 (LET (X) ...)
to say "I plan to initialize this later, e.g., by a SETQ."
Of course, it is well-defined what it will hold if not initialized, 
but it's a nice visual distinction to make anyway.
From: Kee
Subject: Re: Novice question on let function.
Date: 
Message-ID: <qAwR5.651862$8u4.9847974@news1.rdc1.bc.home.com>
more info regarding let is at:
http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node83.html

use 'let' for local variables and 'setf' for global variables

--
Kee Dae Nam
····@home.com

Knowledge is power -- Francis Bacon
"Young-Jin Lee" <······@uiuc.edu> wrote in message
·························@vixen.cso.uiuc.edu...
> Hi, I have difficulty reading some lisp source code.
> What is the (let (var1 var2 var3) ....) means?
> I looks like to initialize each variables to nil, but I couldn't find any
> lisp reference for (let (var1 var2 var3) ...).
> All I found was let ({var | (var value)}*) {declaration}* {form}*.
>
> Thanks in advance.
>
>