Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Bitwise Functions. ---PLEASE HELP!
Message
From
12/10/2001 16:03:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00567866
Message ID:
00567938
Views:
14
Hi Larry,

Thanks for your reply. I was excited when I saw your simple solution. However, I'm still not getting the values that I need in every situation.
Consider the following:

lcTest = -32768
lcTest = bitlshift(lcTest,1) && lcTest now equals -65534 (which doesn't work)
lctest = -(2^16) + lcTest && lcTest now equals -131070, which as you said doesn't work either for the range of a shortint.

The VO function that does a bitLeftShift when lcTest = -32768, returns a 0 (zero)

These bitwise functions make me feel like an idiot as I just don't understand them... Unfortunately, I can't have the programmer change to a longint. What should I do in the instance above? -Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform