MathGroup Archive 1998

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

Search the Archive

Re: How to use HoldForm within Module

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15273] Re: [mg15259] How to use HoldForm within Module
  • From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
  • Date: Thu, 31 Dec 1998 04:39:29 -0500
  • Organization: UMass Lowell Mathematical Sciences
  • References: <199812300650.BAA24661@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Chee:

In addition to your definition of doNOTCHANGE, if you add HoldFirst (or
HoldAll) to the Attributes of doNOTCHANGE, you should get what you
want.
 You set the attributes this way:

Attributes[doNOTCHANGE]={HoldFirst}


Ken Levasseur
Math. Sci. UMass Lowell


Chee Lim Cheung wrote:
> 
> Hello Mathematica gurus,
> 
> I am new to Mathematica. I need to use a function in its original form
> within Module.
> 
> e.g.,doNOTCHANGE[f_]:=Module[{g},g=HoldForm[f];Print[g]]
> 
> may not give what I want as f is already rearranged according to
> Mathematica's lexicographical order within Module,i.e.,HoldForm[f] in
> Module may not be exactly of the same form as f as defined. One example
> is f=-1(UnitStep[t-1]-UnitStep[t-2]).Can any of you out there show me
> the way to get f in its original form inside Module?
> 
> Thanks
> Chee


  • Prev by Date: Re: List handling
  • Previous by thread: How to use HoldForm within Module
  • Next by thread: RE: How to use HoldForm within Module