>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)