From: synthespian
Subject: newbie question: why is the variable undefined?
Date: 
Message-ID: <pan.2002.05.16.00.10.31.322155.4271@uol.com.br>
Hi-

	Can somebody help me?

	(defun what-size (list)
	 (setq size (length list))
          (print size))

	gives me a:

 * (what-size '(1 2 3))
Warning: This variable is undefined:
  SIZE

3 
3

	Now, why is it undefined?
	(Before you ask me, this is a test function. What I really need is 
to pass the value of a list's length as an argument to a variable that'll
serve as a counter of some sort).

	Thank you,

	Cheers
	Henry
	···········@uol.com.br
________________________________________________________
Micro$oft-Free Human         100% Debian GNU/Linux
     KMFMS              "Bring the genome to the people!"
From: synthespian
Subject: Re: newbie question: why is the variable undefined?
Date: 
Message-ID: <pan.2002.05.16.00.43.04.58468.4611@uol.com.br>
On Thu, 16 May 2002 00:10:35 -0300, synthespian wrote:

> Hi-
> 
> 	Can somebody help me?
> 
> 	(defun what-size (list)
> 	 (setq size (length list))
>           (print size))
> 
> 	gives me a:
> 
>  * (what-size '(1 2 3))
> Warning: This variable is undefined:
>   SIZE
> 
> 3
> 3
> 
> 	Now, why is it undefined?
> 	(Before you ask me, this is a test function. What I really need is
> to pass the value of a list's length as an argument to a variable
> that'll serve as a counter of some sort).
> 
> 	Thank you,
> 
> 	Cheers
> 	Henry
> 	···········@uol.com.br

Sorry for the self-reply, no need to answer this: (let ((size length
list)) is the answer.

	Thanks


________________________________________________________
Micro$oft-Free Human         100% Debian GNU/Linux
     KMFMS              "Bring the genome to the people!"