[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating a list
From: |
Cecil Westerhof |
Subject: |
Re: Creating a list |
Date: |
Thu, 19 Nov 2009 14:13:59 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
David Kastrup <dak@gnu.org> writes:
>>>> At the moment I create a list with:
>>>> (setq ret-val (cons total-amount (cons current-amount ())))
>>>> I thought about doing it with:
>>>> (setq ret-val (cons total-amount '(current-amount)))
>>>>
>>>> But then the second value is the string current-amount
>>>
>>> Wrong. The _symbol_ current-amount.
>>
>> When evaluating I got:
>> (1570378.2570192777 current-amount)
>> That is why I thought I got the string.
>
> A string would have quote marks around it.
Off course.
But I have a few questions on my mind.
- Why is the first shown as value and the second as _symbol_?
- current-amount is a local variable. How is it possible that the symbol
is still defined?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Gnus: Some new mails are automatically marked as 'O', Wang Lei, 2009/11/19