Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binary
Message
From
01/03/2006 03:52:02
 
 
To
01/03/2006 03:33:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Binary
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01100270
Message ID:
01100275
Views:
19
>>Hi All,
>>
>>Is there a quick function to convert a number to binary and back again? i.e.
>>
>>
>>A number like
>>739207
>>convert to
>>10110100011110000111
>>convert back to
>>739207
>>
>>
>>I have manually programmed this with BITTEST() each bit in the number but was wondering if there is a simpler function / method that I'm not aware of.
>>
>>Thanks
>
>
>Jos,
>
>There's nothing simpler I'm aware of
>
>If it's only for occasional use, the bittest() will do fine
>
>You could speed it up by handling half a byte or one byte at a time.
>Then you would have an array with the value of the (half) byte + 1 as an index into the array and the value of the element would be '0000', '0001', etc

Hi Gregory. I see. But how to easily convert the binary number back to the original number?
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform