Basic Examples (2) 
Modify the definition of a protected symbol:
The value has changed:
The Protected attribute is restored:
Modify the definition of a protected function:
The definition has changed:
Scope (3) 
Modify multiple protected symbols:
The definitions have changed:
Use an initial value:
Get the operator form of BlockProtected:
Use the operator form:
The value of count was changed:
Create another operator form that initializes a value:
Now the value is always reset before evaluating:
Applications (2) 
A protected symbol cannot usually be cleared:
Clear protected symbols with BlockProtected:
The value is removed:
Write a protected function that caches results in its definition:
The results are cached for faster subsequent evaluations:
The cached value is stored in the definition:
Having the symbol be protected avoids accidental modifications:
Properties and Relations (4) 
Only the Protected attribute is modified within BlockProtected:
The attribute is restored when exiting BlockProtected:
If a symbol is protected when entering BlockProtected, it will be protected when exiting, even if all other definitions are cleared:
If a symbol is unprotected going into BlockProtected, it will be unprotected when coming out:
BlockProtected will ensure that attributes for symbols are restored even if evaluation is interrupted:
BlockProtected is functionally similar to using Unprotect and Protect around the evaluation:
However, this does not prevent evaluation interruptions from leaving symbols in an unprotected state:
Possible Issues (3) 
Symbols that are locked and protected cannot be localized with BlockProtected:
The definition is unchanged:
BlockProtected only ensures that symbols are unprotected before evaluating; it does not prevent symbols from being protected during evaluation:
The second increment of counter failed since it became protected:
Local variables must be symbols: