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!"
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!"