[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using setq to create lists based on other lists...
From: |
Jean-Christophe Helary |
Subject: |
Re: using setq to create lists based on other lists... |
Date: |
Mon, 3 Dec 2018 00:30:49 +0900 |
> On Dec 3, 2018, at 0:00, Stephen Berman <stephen.berman@gmx.net> wrote:
>
> I think your confusion may be due to not distinguishing the value
> assigned by setq, which is a particular object, and the form of the
> value, which may look the same but nevertheless be a different object.
You are absolutely right.
But I think the "not distinguishing" the difference between the two is
partially caused by the way the Reference is written:
Global Variables:
> You specify a value for a symbol with setq. For example, (setq x '(a b))
> gives the variable x the value (a b).
This is not saying: gives the variable x a pointer to the object (a b)
Setting Variable Values:
> setq [symbol form]. . . [Special Form] This special form is the most common
> method of changing a variable’s value. Each symbol is given a new value,
> which is the result of evaluating the corresponding form.
So, I go checking the Evaluation chapter.
And the Evaluation chapter is not very clear. The form in my case is a symbol
form. So it is evaluated as a variable, for its value, and I'm not seeing much
about the value of lists in that chapter.
So I go to the "Lists and Cons Cells" chapter, and there, I'm not finding
anything that tells what the value of a list is.
The only hint I got was when I was looking for the reason for the weird
behavior I was seeing, in the Introduction:
> When a variable is set to a list with a function such as setq, it stores the
> address of the first box in the variable.
That does not say that the value of a list is a "cons", just that for lists,
setq works not as expected from what can be read in the previous parts.
Now, if you think that the Reference has something that puts that clearly, I'd
love a pointer.
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
- Re: using setq to create lists based on other lists..., (continued)
- Re: using setq to create lists based on other lists..., Barry Margolin, 2018/12/02
- Re: using setq to create lists based on other lists..., Stephen Berman, 2018/12/02
- Re: using setq to create lists based on other lists..., Jean-Christophe Helary, 2018/12/02
- Re: using setq to create lists based on other lists..., Stephen Berman, 2018/12/02
- Re: using setq to create lists based on other lists..., Jean-Christophe Helary, 2018/12/02
- Re: using setq to create lists based on other lists..., Michael Heerdegen, 2018/12/02
- Re: using setq to create lists based on other lists..., Jean-Christophe Helary, 2018/12/02
- Re: using setq to create lists based on other lists..., Michael Heerdegen, 2018/12/02
- Re: using setq to create lists based on other lists..., Jean-Christophe Helary, 2018/12/02
- Re: using setq to create lists based on other lists..., Stephen Berman, 2018/12/02
- Re: using setq to create lists based on other lists...,
Jean-Christophe Helary <=
- Message not available
- Re: using setq to create lists based on other lists..., Barry Margolin, 2018/12/04
Re: using setq to create lists based on other lists..., Jean-Christophe Helary, 2018/12/02
Re: using setq to create lists based on other lists..., Barry Margolin, 2018/12/04