|
-
August 2nd, 1999, 04:38 AM
#1
How can Shift a Hex value in VB.
Dear all,
I have a Hex value. I want to shift the Hex value to left 4 position. How I can do it? .. Is any function avialable ?
Regards,
Kareem.
-
August 2nd, 1999, 06:30 AM
#2
Re: How can Shift a Hex value in VB.
try this (I got this from "Crazy D @ work"
private Function LShiftWord(byval w as Integer, byval c as Integer) as Integer
Dim dw as Long
dw = w * (2 ^ c)
If dw And &H8000& then
LShiftWord = CInt(dw And &H7FFF&) Or &H8000
else
LShiftWord = dw And &HFFFF&
End If
End Function
-
November 6th, 2001, 06:30 AM
#3
Re: A bit Of Knowledge From Past

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
November 6th, 2001, 08:14 AM
#4
Re: How can Shift a Hex value in VB.
Shifting to the left acts as a multiplier and to the right divides.
If you myltiply by 16 you will shift 1 position. Multiply (or divide) as many times as possible). I think it should work
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|