here is another possible brainstorming idea for
int/adv users without changing things for beginners.

REBOL []
globvar1: $1000
globvar2: $9999 
myfunc: func [/global globvar1] [
         localvar: $25
         print globvar1
         print globvar2 ; error 
         myinnerfunc: func [/global globvar2] [
              innerlocal: $10
              print localvar
              print globvar1
              print globvar2
         ]
         print globvar2 ; error
         print innerlocal ; error
]
print localvar ; error


and if you do this, it makes no difference (backwards
compatibility):

REBOL []
globvar1: $1000
globvar2: $9999 
myfunc: func [
        /local localvar myinnerfunc
        /global globvar1
] [
         localvar: $25
         print globvar1
         print globvar2 ; error 
         myinnerfunc: func [
              /local innerlocal
              /global globvar2
         ] [
              innerlocal: $10
              print localvar
              print globvar1
              print globvar2
         ]
         print innerlocal ; error
         print globvar2 ; error
]
print localvar ; error

but i lean towards the "::" thing.

- rishi


--- Gregg Irwin <[EMAIL PROTECTED]> wrote:
> Hi Joel,
> 
> << What if REBOL had a new word, e.g.
> GLOBAL-CONTEXT-FROZEN (and
> I'm quite happy for suggestions for a better name!),
> that
> controlled whether adding new words to the global
> context were
> prohibited? >>
> 
> Given the discussion a short while ago about people
> wanting the ability to
> extend *any* context easily, what if you could do
> the following:
> 
>       UNFREEZE context
>       extend context
>       FREEZE context
> 
>       FROZEN? context
>       <can't extend it if frozen>
> 
> I don't how they might work, if it's feasible, or if
> it's even a good idea,
> but it's a thought.
> 
> --Gregg
> 
> -- 
> To unsubscribe from this list, please send an email
> to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to