REBOL Document

Unprotect - Function Summary


Summary:

Unprotects a word or block of words.

Usage:

unprotect value

Arguments:

value - The value argument. (must be: word block)

Description:

Unlocks a word locked with PROTECT so its value may be modified.


    test: "I'm protected, no-one may change me!"
    protect 'test
    if error? try [test: "Trying to change test..."] [
        print "Couldn't change test!"
    ]
    Couldn't change test!


    unprotect 'test
    either error? try [test: "Trying to change test..."] [
        print "Couldn't change test!"
    ][
        print "Changed test word"
    ]
    Changed test word

Related:

protect - Protect a word or block to prevent from being modified.


<Back | Index | Next>

Copyright 2004 REBOL Technologies