newLISP Fan Club

Forum => newLISP in the real world => Topic started by: cameyo on June 01, 2022, 09:32:46 AM

Title: setq '
Post by: cameyo on June 01, 2022, 09:32:46 AM
(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
Title: Re: setq '
Post by: HPW on June 04, 2022, 07:55:20 AM
Hello,



setq is short for set quote. ;-)



> (setq a 3)
3
> a
3
> (set 'a 4)
4
> a
4
Title: Re: setq '
Post by: cameyo on June 04, 2022, 10:51:01 AM
Yes.

I know it is wrong, but after:
(setq 'a 3)
> 3

the symbol a is created, but is nil.

Where is the value 3? ;-)
Title: Re: setq '
Post by: cameyo on July 04, 2022, 06:58:37 AM
Solution of my problem:

//http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4580