Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Evaluation Control >

NHoldFirst

NHoldFirst
is an attribute which specifies that the first argument to a function should not be affected by N.
Prevent N from affecting the first argument of a function:
Prevent N from affecting the first argument of a function:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
System symbols with the NHoldFirst attribute:
The k^(th) zero of the zeta function on the critical line with the imaginary part greater than t+pi:
N does not affect the index k:
When the second argument is numeric, N evaluates numerically:
Define an "inverse" for J_k(x):
Set the NHoldFirst attribute so that k remains an integer:
A symbolic representation of an inverse of J_1(x):
This remains unmodified with N:
With a numeric value of x, the function binv evaluates numerically:
HoldFirst prevents evaluation while NHoldFirst only prevents numerical evaluation:
You can prevent both by setting both attributes:
New in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team