MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ClearAll error message


Hi,

can it be the case that the first part of the message below has nothing
to do with the question you have posted here ?

And

ClearAll[Symbol["A"]]

can't work because to get the symbol A the argument must evaluated
but Mathematica has an infinite evaluation loop and it can't stop
the evaluation after the first time so that
Symbol["A"] would evaluate to A and this would evaluated to the value
of A.

That's why ClearAll[] also accept strings and ClearAll["A"] work as 
expected.

Regards
   Jens


carlos at colorado.edu wrote:
> Actually this was not a big deal.  The group working with the program was
> puzzled by the message but soon it was fixed. BTW, one student came
> with an elegant one-liner to create a nxn symmetric array:
> 
>   S=Table[rootname[Min[i,j],Max[i,j]],{i,n},{j,n}]
> 
> The Clear behavior seems largely a question of esthetics.  One of the basic
> rules of functional programming is function composition equivalence:
> 
>         y:=f(x); z:=g(y)    equiv    z:=g(f(x))
> 
> Since   name=Symbol["A"]; ClearAll[name] is not equivalent
> to   ClearAll[Symbol["A"]] the rule is violated here, and likewise
> for any function with HoldAll attribute.  Correct?
> 


  • Prev by Date: BTopTools for Mathematica extends data acquisition capabilities to the lab environment
  • Next by Date: Re: Display Math Formula
  • Previous by thread: Re: ClearAll error message
  • Next by thread: Graph Theory / Cycle Matrix