Hi Phil,


1. As a matter of principle REBOL lets you modify the value of each and
every word. There are no keywords. This is good.

2. To protect all words that are part of the REBOL vocabulary use the
built-in function
protect-system.

3. To protect selected words (here return) use the function protect, as in 

>> protect 'return
>> return: none
** Script Error: Word return is protected, cannot modify.
** Where: return: none

You can have it your way without limiting REBOL's flexibility.

At 10:22 PM 3/7/00 +0000, you wrote:
>Consider the following code :
>
>REBOL []
>; Check function
>check1: function [] []
>[
>    x: "A"
>    if x <> none [return "Error"]
>    print "This should not print"
>    return none
>]
>print check1
>
>
>does not print the text (correctly).
>
>However adding the line
>    return: "Error"
>
>gives
>REBOL []
>; Check function
>check1: function [] []
>[
>    return: none
>    x: "A"
>    if x <> none [return "Error"]
>    print "This should not print"
>    return none
>]
>print check1
>
>does print the text
>(I accidentally added this line to a sub-function, instead of return none,
>and it took me ages to track this down)
>
>Shouldn't progress stop us setting variables like return: ???
>
>Cheers Phil
>
>
>

;- Elan >> [: - )]

Reply via email to