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

[REBOL] Re: Is Rebol dynamic?

From: lmecir:mbox:vol:cz at: 28-Nov-2002 15:46

Hi Romano, ----- Original Message ----- From: "Romano Paolo Tenca"
> I remember Holger saying that a rebol block must not be changed during > execution. > > I think that it is safe to change 1 or more elements of block during > execution, but not to insert/remove any item. > > Can changing (not inserting) be a safe programming style for future
releases?
> --- > Ciao > Romano
Holger's advice is OK. Can we change the elements of an executed block? This seems to work "expectedly":
>> a: func [x] [type? get/any 'x] >> b: func [x] [type? get/any 'x] >> block: [a (block/1: 'b 12)]
== [a (block/1: 'b 12)]
>> do block
== integer! How about this?
>> block: [a: (block/1: first [b:] 12)]
== [a: (block/1: first [b:] 12)]
>> do block
== 12
>> b
== 12 Ciao -L