WLJS LogoWLJS Notebook

NHoldRest

NHoldRest is an attribute which specifies that all but the first argument to a function should not be affected by N.

This attribute prevents numerical evaluation of arguments other than the first when N is applied.

Examples

SetAttributes[f, NHoldRest];
N[f[1/3, 1/7]]
Attributes[Plot]
(* Compare with and without NHoldRest *)
ClearAttributes[g, NHoldRest];
N[g[1/2, 1/3]]

*See the official Wolfram Language Reference for more details.

On this page