MathGroup Archive 2004

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

Search the Archive

Re: How to prevent from simplification?


HoldForm works for me as does Hold and HoldComplete

(#[a+b/c]& /@ 
      {HoldForm, Hold, HoldComplete}) /. 
  {a->5, b->7, c->8}

{HoldForm[5 + 7/8], Hold[5 + 7/8], HoldComplete[5 + 7/8]}

ReleaseHold[%]

{47/8, 47/8, 47/8}


Bob Hanlon

> 
> From: Christian Auner <mca at nurfuerspam.de>
To: mathgroup at smc.vnet.net
> Date: 2004/11/27 Sat AM 01:40:44 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg52464] [mg52441] How to prevent from simplification?
> 
> How can I substitute values into an expression and prevent it from
> beeing evaluated and simplified?
> 
> Assume I have an expression like
> 
> a + b/c 
> 
> and I want to substitute values for a,b and such that the result looks
> like
> 
> number + number
> 
> That is the evalution stops right before the addition.
> 
> I already tried HoldForm but it didn't work.
> 
> 


  • Prev by Date: Re: Combining graphics and tabels in one cell
  • Next by Date: Re: Re: Boolean Type
  • Previous by thread: Re: How to prevent from simplification?
  • Next by thread: Re: How to prevent from simplification?