Page 1 of 1

setq '

Posted: Wed Jun 01, 2022 4:32 pm
by cameyo

Code: Select all

(setq 'a 3)
output: 3
a
output: nil
Which symbol is binded with 3?
How to retrieve it?

p.s. it's only a curiosity

Re: setq '

Posted: Sat Jun 04, 2022 2:55 pm
by HPW
Hello,

setq is short for set quote. ;-)

Code: Select all

> (setq a 3)
3
> a
3
> (set 'a 4)
4
> a
4

Re: setq '

Posted: Sat Jun 04, 2022 5:51 pm
by cameyo
Yes.
I know it is wrong, but after:

Code: Select all

(setq 'a 3)
> 3
the symbol a is created, but is nil.
Where is the value 3? ;-)

Re: setq '

Posted: Mon Jul 04, 2022 1:58 pm
by cameyo
Solution of my problem:
viewtopic.php?f=16&t=4580