This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)


sets the attribute Protected for the symbols .
protects all symbols whose names match any of the string patterns .
  • Protect allows abbreviated string patterns containing the following metacharacters:
*zero or more characters
@one or more characters, excluding uppercase letters
\\*, etc.literal *, etc.
  • Protect protects all symbols in a particular context.
Define and protect a function:
The function definition can no longer be changed:
Define and protect a function:
Click for copyable input
The function definition can no longer be changed:
Click for copyable input
Protect several symbols:
Protect all symbols matching a string pattern:
Protect all symbols in the current context:
Protecting a symbol is equivalent to setting the Protected attribute:
Protect returns the list of symbols actually protected:
If a symbol is already protected, it is not protected again:
No more definitions can be made for a protected symbol:
To protect all symbols given in a variable, use Evaluate:
New in 1