Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Scope? Any advice would be appreciated.

From: al:bri:xtra at: 28-Jan-2001 23:17

Victor Mascari wrote:
> lcDoesnt: func [ /local b ] > [ > b: [ 0 0 0 ] > print "The following line should ALWAYS be: 0 0 0 " > print b > > b/3: b/3 + 1 > > print "The follwing line should ALWAYS be: 0 0 1 " > print b > print "......................." > ]
It's normal behaviour. You'll need to read either "Rebol: The Official Guide", "Rebol for Dummies" or the Core manual book or PDF. They explain your "problem" in better detail. Basically the block assigned to the local word 'b in the function assigned to the word 'lcDoesnt "hangs around". It's called "indefinite extent", IIRC. It's like allocating an array to a pointer in C or Pascal. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/