Unprotect

Unprotect[s1,s2,]

removes the attribute Protected for the symbols si.

Unprotect["form1","form2",]

unprotects all symbols whose names textually match any of the formi.

Details

  • A typical sequence in adding your own rules for builtin functions is Unprotect[f];definition;Protect[f].

Examples

open allclose all

Basic Examples  (1)

Default behavior:

Unprotect and modify the definition:

New behavior:

Scope  (2)

Unprotect several symbols:

Unprotect all symbols in the current context:

Applications  (2)

Unprotect a system symbol to make a definition for it:

Restore protection:

Unprotect and clear all symbols in a package, to allow it to be read twice:

Properties & Relations  (4)

Unprotecting a symbol is equivalent to clearing the Protected attribute:

Unprotect returns the list of symbols actually unprotected:

To modify definitions of a protected symbol, unprotect it first:

To unprotect all symbols given in a variable, use Evaluate:

Introduced in 1988
 (1.0)