setq '

Q&A's, tips, howto's
Post Reply
cameyo
Posts: 168
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

setq '

Post 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

HPW
Posts: 1387
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Re: setq '

Post by HPW »

Hello,

setq is short for set quote. ;-)

Code: Select all

> (setq a 3)
3
> a
3
> (set 'a 4)
4
> a
4
Hans-Peter

cameyo
Posts: 168
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: setq '

Post 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? ;-)

cameyo
Posts: 168
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: setq '

Post by cameyo »

Solution of my problem:
viewtopic.php?f=16&t=4580

Post Reply