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

[REBOL] Re: : [] in a function => was {Re: Re: to-char}

From: brett::codeconscious::com at: 14-Feb-2002 17:18

Hi Jason, Here's an "article" I recently wrote that might help: http://www.codeconscious.com/rebol/articles/rebol-concepts.html Warning though, it has not been critiqued in any way.
> Q: Why, at the console does someblock: [] create a fresh block, but within
a
> script function someblock: [] persists and needs to be remedied by > copy [], clear [] or make block! 123 statements?
My answer would be that each time you enter a [] at the console, Rebol will recognise the string form of a block and create one in memory - so you get multiple - one each time you do it. Within a script however, Rebol will recognise the form of the block once (when the script is loaded) and thus create the block in memory once. I don't know if this is *exactly* right but it seems like it could be close enough. Regards, Brett.