REBOL3 tracker
  0.9.12 beta
Ticket #0001336 User: anonymous

Project:



rss
TypeNote Statuscomplete Date10-Nov-2009 12:04
Versionalpha 94 CategoryDatatype Submitted bymeijeru
PlatformAll Severityminor Prioritynormal

Summary MAKE BITSET! with list of bits to be set specified by binary string has a restriction to 256 values
Description Bitsets are not only used to conveniently encode sets of character values, but it IS one of their main usages. Since the introduction of 16 bit characters, such bitsets can be 65536 long. They can be made by specifying character values or integers within the range 0 - 65535 as indices for the bits to be set. However, when using a binary string containing indices, these are necessarily restricted to the range 0 - 255.
Example code
>> make bitset! [#{0102030405102030}]
== make bitset! #{7C00800080008000}

Assigned ton/a Fixed in- Last Update15-Nov-2009 00:49


Comments
(0001784)
BrianH
15-Nov-2009 00:35

A few comments:
- Characters are not 16bit, they are Unicode codepoints (which is currently around 24bit, more or less).
- The current limitation of characters to the 16bit BMP is likely temporary.
- There are other ways to specify bitsets than a binary string containing indices.
- If you want to specify bitsets for characters, you can quite easily do so with chars or strings in the spec.

Bitsets are used for a variety of purposes, and as such we have provided a variety of different ways to specify them. Each of these ways has advantages or disadvantages depending on what you are doing. It is best to pick the spec method that works best for your particular case and go with it :)

Date User Field Action Change
15-Nov-2009 00:49 BrianH Code Modified -
15-Nov-2009 00:35 BrianH Status Modified submitted => complete
15-Nov-2009 00:35 BrianH Comment : 0001784 Added -
10-Nov-2009 13:13 meijeru Description Modified -
10-Nov-2009 12:04 meijeru Ticket Added -