I wonder where or how I can get the value which is assign by setq to a symbol like this:
(setq 'f 100)
'f ;;-> f
''f ;;->'f
How can I get the value 100?
Maybe you can define 'f in a different way:
(set (sym {'f}) 100)
;-> 100
(eval (sym {'f}))
;-> 100
or
(set (sym {''f}) 2)
;-> 2
(eval (sym {''f}))
;-> 2
cameyo
Wel you either do
> (set 'f 100)
100
> f
100
Or you do
> (setq f 100)
100
> f
100
With set you have to quote because set evaluates its arguments, setq doesn't.
Many thanks! But where is the value stored in the expression "(setq 'f 100)"
Whereever it is stored, if anywhere, it is immediately deleted on returning from setq. Why? Because 'f is the same as (quote f) And setting a value to a quote cell doesn't bind it to a symbol... so the ORO memory manager (should) just toss it.