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

[REBOL] Re: Stupid question: Locals ??

From: greggirwin:mindspring at: 17-Dec-2002 11:26

Hi Robert, RMM> paragraph: has [name pvalue toemit][ RMM> toemit: make block! ['textbox ""] RMM> ; value now has a name/value structure itself RMM> foreach tmp value [ RMM> name: tmp/1 RMM> pvalue: tmp/2 RMM> switch/default name [ RMM> parapart [append last toemit pvalue] RMM> ][print ["Unknown INLINE-TAG found:" name]] RMM> ] RMM> emit toemit RMM> ] RMM> The strange thing is that 'toemit keeps its value between calls to RMM> paragraph. Why this? It's declared as local and I create a new block RMM> each time. Robert Are you sure toemit is keeping its value? Using make block! should work, but you're doing an APPEND LAST, so you're adding to the last element of toemit, which is "" initially, not copied, so I think that's what is keeping its value. -- Gregg