[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a list

From: Barry Margolin
Subject: Re: Creating a list
Date: Thu, 19 Nov 2009 08:47:09 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 Cecil Westerhof <address@hidden> wrote:

> David Kastrup <address@hidden> 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.

I think you mean "of course".

> But I have a few questions on my mind.
> - Why is the first shown as value and the second as _symbol_?

Because you quoted the list containing the symbol, so it wasn't 

> - current-amount is a local variable. How is it possible that the symbol
>   is still defined?

Symbols are permanent, only bindings are local.

Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

reply via email to

[Prev in Thread] Current Thread [Next in Thread]