(setq temp1 nil)
or is it better to do
(unintern 'temp1)
The temp1 var holds a big list, and there are few more, e.g. temp2,
temp3.
-----------------------------
Mathematica is similar to lisp in the symbol system. In Mathematica,
lisp's “unintern” is “Remove”. From my know-how, basically you don't
Remove a symbol. You just Clear it (set it to nil).
-----------------------------
if i use “let”, that means few hundred lines inside it with other
lets. Not desirable.
How do you solve this problem?
Thanks.
Xah
you cannot delete a symbol. the garbage collection deletes objects
automatically when not referenced anymore. but since the symbol templ
is referenced by your program it cannot be deleted.
uninterning doesn't do the job either because it just causes the
reader not to recognize your symbol templ anymore. when you enter an
expression containing templ after uninterning it the reader will
create a new symbol different from your old symbol templ that just
happens to have the same name.
you also don't need to unbind templ. unbinding is done automatically
once the binding form is left.
what you actually want to do is to return templ into the state it had
when your program started. this is done by (setq templ nil).
You shouldn't have given those explanations to Xah, now he will write
yet another article about the idiocy of lisp hackers who designed such a
system...
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
you mean my articles describing idiots like you?
Here's a juicy passage of Pascal J Bourguignon fellow, in which you
can get a glimpse of his highness:
«Ruby's been done by some Japanese newbie... I guess there was some
language barrier preventing him to learn from the 50 years of
occidental experience in programming language design. At least, he
wasn't a "linguist"... In any case, why should we suffer for THEIR
incompetences?!?»
Xah
thanks. That's useful.
Xah