Re: some bit math help
- From: "Rick Rothstein" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 20:38:01 -0400
> > I want to store binary information as binary, such as an array of
1024
> > checkboxes into 1024 bits, represented by 128 long character string.
I
> > cannot figure out how to do this in VB except in blocks of 8 bits or
1
> > character. I want to be able to set, get, clear, and read the
> > individual bits within the 128 chars-length string and past the
> > settings as a VB string.
>
> I would suggest you store it as a byte array, rather than a string.
If you're
> hellbent on using a string, you do realize they're 16-bits per
character, right?
> You'd want to use MidB$() to extract the individual bytes, based on a
little math to
> determine which was what.
Agreed! After all, memory isn't really that dear any more. However,
unless the OP set those 1024 CheckBoxes up in a control array (or,
perhaps, a small number of control arrays), thus making them accessible
via a simple loop, it won't much matter what method he settles on... the
code that will be necessary to store that many non-arrayed controls will
be loooong and ugly.
Rick
.
- Follow-Ups:
- Re: some bit math help
- From: Michael C
- Re: some bit math help
- References:
- some bit math help
- From: Martin Nemzow
- Re: some bit math help
- From: Karl E. Peterson
- some bit math help
- Prev by Date: Re: some bit math help
- Next by Date: Re: MKDir not working
- Previous by thread: Re: some bit math help
- Next by thread: Re: some bit math help
- Index(es):
Relevant Pages
|