In Rebol 2 you could check for an empty bitset with EMPTY?
>> empty? make bitset! #{00}
== true
In Rebol 3 (Build 21-Feb-2011/0:44:24) this is not the case.
>> empty? make bitset! #{00}
== false
Bug or new behavior? Either way, how else might I do this test? Empty bitsets of different sizes do not compare as equal in either R2 or R3:
>> (make bitset! #{00}) == (make bitset! #{0000})
== false
New behaviour: a bitset with >0 bits is not empty; even if it has no bits set, it still contains cleared bits.
In R3, you can
ora given bitset with the empty bitset, to find out if the first is empty — that is: it has no bits set — as well:As a convenient shortcut, you can also just
orwith an emptybinary!, enabling the following definition:Again, using your examples: