Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Replace/No Rearrangement

  • To: mathgroup at
  • Subject: [mg5315] Re: [mg5300] Replace/No Rearrangement
  • From: Tatsuki Inoue <tatsu at>
  • Date: Wed, 27 Nov 1996 01:47:33 -0500
  • Sender: owner-wri-mathgroup at


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

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