MathGroup Archive 1996

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

Search the Archive

Re: Replace/No Rearrangement


Hi. 

Rempe> Hi, parts, so I don't want rearrangement.  For example,
Rempe>         t=a+b+c+d
Rempe>         t[[2]]=x
Rempe> Mathematica reorders the function Out[47]= a + c + d + x
Rempe> Instead, I want the output this way

I use "ClearAttributes[]" to remove arrangement. For example,

In[1]:= Unprotect[Plus]; ClearAttributes[Plus,Orderless];
In[2]:= t=a+b+c+d
Out[2]= a + b + c + d
In[3]:= t[[2]]=x
Out[3]= x
In[4]:= t
Out[4]= a + x + c + d

========================================================
Tatsuki Inoue 
Dept.of Manag.Sci., Science Univ.of Tokyo
E-mail: tatsu at ms.kagu.sut.ac.jp
========================================================




  • Prev by Date: Re: Formatting Output
  • Next by Date: Argument types
  • Previous by thread: Replace/No Rearrangement
  • Next by thread: Re: Replace/No Rearrangement