Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Need a new type of Hold

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7499] Need a new type of Hold
  • From: Ersek_Ted%PAX1A at mr.nawcad.navy.mil
  • Date: Sat, 7 Jun 1997 03:48:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I could use a new type of Hold that is similar to HoldForm.
The difference is I don't want the new Hold to show up in
the FullForm.

Lets call this new feature HoldTemporary.
The following shows the way I want it to work.

(*-----------------------------------------*)

In[1]:=  foo=HoldTemporary[z+2+d+a+3]
Out[1]=  z+2+d+a+3

In[2]:= foo-d+4
Out[2]= 9+a+z

In[3]:=  HoldTemporary[z+2+d+a+3]//FullForm
Out[3]=  Plus[z,2,d,a,3]

(*------------------------------------------*)
Using HoldForm I have to do the above as follows:

In[4]:=  goo=HoldForm[z+2+d+a+3]
Out[4]=  z+2+d+a+3

In[5]:=  ReleaseHold[goo]-d+4
Out[5]=  9+a+z

(*------------------------------------------*)
The feature I want will make it easy to write Packages that display the
output in a non-standard way, but will not place an extra burden on the
user of the package.

Can HoldTemporary be built with features included in Mma 3.0 ?
I have tried, and can't find a way.

          Ted Ersek
          ersek_ted%pax1a at mr.nawcad.navy.mil



  • Prev by Date: Creating table with multiple lists
  • Next by Date: Unfinished machine arithmatic
  • Previous by thread: Re: Creating table with multiple lists
  • Next by thread: Re: Need a new type of Hold