Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ascii conversion w/ 7 bits
Message
From
15/01/2003 06:35:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00741726
Message ID:
00741822
Views:
21
>Hi,
>I need to convert ascii to hex in a 7 data bits/1 parity bit/even parity format.
>When I use: cHexval=RIGHT(TRANSFORM(ASC(cValue),"@0"),2)
>I don't get the value formatted properly. My guess it that it's an 8 data bits format.
>Does someone know how I can change the format to give me the results I need?
>Thanks
>Allen

I suspect the parity bit is missing, or always zero. The parity bit is supposed to be a primitive version of a checksum - the 8th. bit is set so that the number of binary ones is even. I am not sure whether the parity bit is typically the first one or the last one, and I don't think there is a fast shortcut to code this.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform