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:

Wolfram Research (1988), Unprotect, Wolfram Language function, https://reference.wolfram.com/language/ref/Unprotect.html.

Text

Wolfram Research (1988), Unprotect, Wolfram Language function, https://reference.wolfram.com/language/ref/Unprotect.html.

BibTeX

@misc{reference.wolfram_2021_unprotect, author="Wolfram Research", title="{Unprotect}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Unprotect.html}", note=[Accessed: 21-June-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_unprotect, organization={Wolfram Research}, title={Unprotect}, year={1988}, url={https://reference.wolfram.com/language/ref/Unprotect.html}, note=[Accessed: 21-June-2021 ]}

CMS

Wolfram Language. 1988. "Unprotect." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Unprotect.html.

APA

Wolfram Language. (1988). Unprotect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Unprotect.html