RE: HoldForm Obscurities

*To*: mathgroup at smc.vnet.net*Subject*: [mg33979] RE: [mg33945] HoldForm Obscurities*From*: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>*Date*: Thu, 25 Apr 2002 02:59:53 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

> -----Original Message----- > From: Dustin Vink [mailto:d.vink at mech.gla.ac.uk] To: mathgroup at smc.vnet.net > Sent: Wednesday, April 24, 2002 7:22 AM > To: mathgroup at smc.vnet.net > Subject: [mg33979] [mg33945] HoldForm Obscurities > > > Dear Reader, > > Can someone explain the following obscurity? > > In: HoldForm[Times[1, 1, 2, 2]] > > Out: 2 2 > > In: HoldForm[Times[1, 1, 2, 1]] > > Out: 1 1 2 1 > > In: HoldForm[Times[1, 1, 2]] > > Out: 1 1 2 > > In: HoldForm[Times[2, 1, 2]] > > Out: 2 2 > > > Dustin ~:( > > Dustin, this observation of you has nothing to do with HoldForm (or Hold, showing the same phenomenon). This already happens when Mathematica input is parsed to form an expression. See In[14]:= MakeExpression["1 1 2 2"] Out[14]= HoldComplete[2 2] Some transformations are already made when reading input (to ease the interpreter). Another example would be In[15]:= MakeExpression["2^^1011"] Out[15]= HoldComplete[11] So here some 1-s are (occasionally) skipped at Times. No harm is done with this. I don't know what you like to achieve, perhaps better manipulate strings. -- Hartmut