## `unprotect` -- remove protection of identifiers

#### Introduction

`unprotect``(x)` removes any write protection of the identifier `x`.

#### Call(s)

`unprotect(x)`

#### Parameters

`x` | - | an identifier

#### Returns

the previous protection level of `x`: either Error or Warning or None (see `protect`).

#### Related Functions

`protect`

#### Details

- `unprotect(`x`)` is equivalent to `protect``(x, None)`.
- `unprotect` does not evaluate its argument. Cf. example 2.

#### Example 1

`unprotect` 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 2

`unprotect` 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:

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000