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

[REBOL] Re: DyBASE test

From: SunandaDH:aol at: 27-Dec-2003 17:18

> And once object > is created it is not possible to add fields to it (very strange > restriction for such flexible and dynamic language as Rebol).
In simple cases (if the object is not yet referenced anywhere else), it is very simple.... an-object: make object! [field1: now] an-object: make an-object [field2: true] ;; "adds a field" Problems may arise if the original an-object is referenced elsewhere: a-block: copy [] an-object: make object! [field1: now] append a-block an-object an-object: make an-object [field2: true] append a-block an-object probe a-block/1 ;; not the same as probe a-block/2 ;; this See also ct.r and its documentation -- it may be doing what you need (though it doesn't solve the existing-references problem) Sunanda.<