metaeducation / rebol-issues

6 stars 1 forks source link

Complemented bitsets behave incorrectly upon extension #1541

Open rebolbot opened 14 years ago

rebolbot commented 14 years ago

Submitted by: meijeru

Futher to #1355, negatively specified bitsets behave incorrectly upon extension. A normal bitset will grow when a bit beyond its length is set to true, but not when it is set to none. A complemented bitset should behave in the opposite way, but it does not.

>> b: charset " "
== make bitset! #{0000000080}
>> b/48: true ;; or poke b 48 true
>> b
== make bitset! #{00000000800080}
>> b: complement charset " "
== make bitset! [not bits #{0000000080}]
>> b/48: none
>> b
== make bitset! [not bits #{0000000080}]  ; wrong! should add a bit
>> b/48: true
>> b
== make bitset! [not bits #{00000000800080}] ; should not have added a bit

CC - Data [ Version: alpha 97 Type: Bug Platform: All Category: Datatype Reproduce: Always Fixed-in:alpha 108 ]

rebolbot commented 14 years ago

Submitted by: BrianH

Changed the summary to include the keyword "complement".