Locked

Locked

is an attribute that, once assigned, prevents modification of any attributes of a symbol.

Details

  • The attribute Locked, by itself, only affects whether attributes can be changed, not other properties of the symbol.
  • Locked is typically used in combination with Protected to prevent any further modification of a symbol.

Examples

open allclose all

Basic Examples  (2)

List has attribute Locked:

Protect and lock the symbol f:

Properties & Relations  (5)

The attribute Locked, once set, cannot be removed:

By itself, the attribute Locked does not prevent adding definitions to a symbol:

However, no new attributes can be added:

If a symbol is protected and locked, its definitions can no longer be changed:

Clear can clear the values and definitions for locked symbols:

ClearAll does not affect locked symbols:

Remove does not affected locked symbols:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_locked, organization={Wolfram Research}, title={Locked}, year={1988}, url={https://reference.wolfram.com/language/ref/Locked.html}, note=[Accessed: 21-November-2024 ]}