HoldComplete[2 3 3] will return HoldComplete[2 3 3].
HoldComplete[b a] will return HoldComplete[b a].
Everything works fine here, no replacement rules called, no evaluation done, the Flat attribute didn't apply.
but things get weird when we evaluate HoldComplete[a 2 1 2]:
The desired result shall be HoldComplete[a 2 1 2] as no modification should be done here, however, the result is HoldComplete[a 2 2], it seems that the 1 is magically omitted as it's not important here in multiplication!
How could this happen? Is this a bug? How can I solve this problem?
Thanks!
FullForm. The1is not displayed, but it is in fact there. – Szabolcs May 27 '17 at 14:32HoldComplete[a 2 1 2] // FullFormreturnsHoldComplete[Times[a, 2, 1, 2]]while do the same to the evaluation result ofHoldComplete[a 2 1 2]would giveHoldComplete[Times[a, 2, 2]]– Wjx May 27 '17 at 14:36FullFormto the actual evaluation result. You are applying it to some text in the output cell. That is not the same thing. Assign the result to a variable. – Szabolcs May 27 '17 at 14:401in InputForm, so if this is important, you could set the default output to be in input form ... – Szabolcs May 27 '17 at 14:45