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


From: larry:ecotope at: 13-Jun-2001 12:54

Hi Karl, You wrote:
> I've written a C++ class to read REBOL code as values and now my own > REBOL-like language. I'm pretty sure I have a handle on how REBOL stores > values. > > My basic value is something like this: > > struct Value { > DatatypeReference type; > union data { > int integer; > double decimal; > bool logic; > char tuple[10]; > Block* block; > String* string; > // etc... > }; > }; > > For REBOL the sizeof(Value) seems to be 16 bytes. As you can see, adding
> simple data type to a block (array of Values) will not increase its size
> the data is stored in the value. I hope this helps you to visualize what
> be going on.
Thanks for sharing your insights. BTW do your "values" incorporate, in the case of blocks, the current index as described by Holger in his recent post.
> -Karl > > P.S. Opps, I just realized I have assumed you are a C programmer!
Yes, I am familiar with C and C++ although not using them much at the present time. -Larry