MathGroup Archive 2003

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

Search the Archive

Re: Mathematica 5.0: small change in fundamental behaviour.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43073] Re: Mathematica 5.0: small change in fundamental behaviour.
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Mon, 11 Aug 2003 02:15:53 -0400 (EDT)
  • References: <bh278r$hsm$1@smc.vnet.net>
  • Reply-to: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Sender: owner-wri-mathgroup at wolfram.com

"Bern" <bgress at mail.DOTucr.DOT.edu> wrote in message
news:bh278r$hsm$1 at smc.vnet.net...
> Hello everyone,
>
> Has anyone noticed that in 4.2 one can define
>
> x = Table[x_k,{k,3}]
>
> (where "_" means subscript) , for example,
>
> with no problem,
>
> but, in 5.0 one gets a recursion error?
>
> I think this will require me to rewrite more than one software now!
>
> Bernard
>

Bern,
Like Murray Eisenberg I would be surprised if no recursion occured in 4.2.
My understanding of the evaluation steps for x=expr is (where expr* means
the value of expr)

x= expr
x= expr*
(store the rule, rr say,coresponding to the above)
expr*
But now, since the rule for Set (=) has been used, the standard evaluation
process requires this to be evaluated, and the x in expr* in your example
plus the rule rr lead to recursion.

The following shows these steps without provoking recursion.
In[1]:=
    Clear[a, b, c]
In[2]:=
    a = {b, b = c}
Out[2]=
    {c, c}

Here is the stored rule. Note {b,c} not {c,c} on the right.


In[3]:=
    OwnValues[a]
Out[3]=
    {HoldPattern[a] :> {b, c}}


Allan
---------------
Allan Hayes
hay at haystack.demon.co.uk
Voice: +44 (0)116 241 8747
Fax: +44 (0)870 164 0565



  • Prev by Date: graphs and AxesOrigin
  • Next by Date: graphs and AxesOrigin
  • Previous by thread: Re: Mathematica 5.0: small change in fundamental behaviour.
  • Next by thread: Re: Mathematica 5.0: small change in fundamental behaviour.