REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: unprotect

unprotect  value  /deep  /words  /values

Unprotect a series or a variable (it can again be modified).

Arguments:

value [word! series! bitset! map! object! module!]

Refinements:

/deep - Protect all sub-series as well

/words - Block is a list of words

/values - Process list of values (implied GET)

See also:

protect  

Description

Unprotects a series, variable, or object that was protected earlier with protect.

For example:

test: "text"
protect test
append test "a"
** Script error: protected value or series - cannot modify
unprotect test
append test "a"
probe texta
"texta"

To unprotect all series found within a block, use the /deep refinement:

test: [100 "example" 10:20]
protect/deep test
print append "example" "x"
** Script error: protected value or series - cannot modify
unprotect/deep test
print append "example" "x"
examplex

See protect for other usage and information.


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin