i need to get every bit of every character and transfer it to the previous character. nokia phones only need 7-bits for a character. the 8th bit is taken from the next byte of the next character. for example in the first element of a string, the 8th bit of is masked, 0x7F, and the 8th bit will be occupied by the least significant bit of the next character. so the 2nd character will only have 6 bits remaining (since the 8th bit of it is, again, masked). to complete its 8 bits, the 7th and 8th bit of the second character will be occupied by the last two least significant bit of the 3rd character. and the third character will only have 5 bits remaining (1 masked, 2 shifted to the previous byte). this is done until the last character that will be send. so we a right shifting bits in every data that will be sent.
Robert Adsett <subscriptions@aeolusdevelopment.com> wrote:
At 03:25 PM 8/11/04 -0700, you wrote:
>sorry for the OT but i really have a hard time making this program run. im
>new in VB.
>
>i have a code done in VB6. now, i want to manipulate every element
>(character) of a string variable. i want to shift its bits to the left. my
>professor told me that it can't be done in VB,
Before you get too hung up on this. It is possible to shift in basic, it's
just called multiply and divide. A single left shift is a multiply by 2
and a single right shift is a divide by 2. That would save you the hassle
of an interlanguage dll call.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, III
Yahoo! Groups SponsorADVERTISEMENT
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.Message
Re: [AVR-Chat] OT: .DLL coded in Visual C++, called in VB6; HELP!
2004-08-11 by jay marante
Attachments
- No local attachments were found for this message.