Hi Peter, > Hi Gabriele > > Just for clarification; does that imply that each character in a string > requires 16 bytes? > > >> before: system/stats > == 1946183 > >> my-string: "a" > == "a" > >> after: system/stats > == 1947087 > >> after - before > == 904 > >> > > or possibly more? > > Regards > > Peter > > On Sunday, February 4, 2007, at 06:13 pm, Gabriele Santilli wrote: > Actually not. Every character in a block (e.g. [#"a" #"b"]) requires 16 bytes, because that is a block slot size. Puzzle: are you able to prove that using REBOL? - I am - see my functions in http://www.compkarori.com/vanilla/display/peek_and_poke.r for start. Since this puzzle is *hard*, I can decompose it to a set of easier puzzles, that more users may be able to solve.
As opposed to the above the slot size in string/binary/etc. (see any-string! datatype) is exactly one byte long, therefore every element of an any-string requires exactly 1 byte - can be proven using http://www.compkarori.com/vanilla/display/peek_and_poke.r - this *is easy*. Moreover, the slot size of a bitset "slot" is exactly one bit - this is harder, but can be proven using the results of the above puzzles. -Ladislav -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
