unprotect -- remove protection
of identifiers
Introductionunprotect(x) removes any write protection
of the identifier x.
Call(s)unprotect(x)
Parametersx |
- | an identifier |
Returnsthe previous protection level of x: either Error or Warning or None (see protect).
Related
Functions
Detailsunprotect(x) is equivalent to protect(x,
None).unprotect does not evaluate its argument. Cf.
example 2.
Example
1unprotect allows to assign values to system
functions:
>> unprotect(sign): sign(x) := 1
1
However, we strongly advise not to change identifiers protected by the system. We undo the previous assignment:
>> delete sign(x): protect(sign, Error):
Example
2unprotect does not evaluate its argument.
Here the identifier x is unprotected and not its value
y:
>> x := y: protect(y): unprotect(x): y := 1
Warning: protected variable y overwritten
1
>> unprotect(y): delete x, y: