Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binary to Hex Conversion
Message
De
17/06/1997 10:51:40
 
 
À
16/06/1997 19:02:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00036266
Message ID:
00036640
Vues:
59
>So, if it's in string format: for the 5th field you must set the 5th character to 0/1 (Off/On), not bit. Am I right?
>
>It's still not clear what formats you need to used. :(
>
>Do you have an example?
>
>Give me an example of binary number you will use and what VFP len() function will return on this number (ie: how many character positions does it take in the file). The same for a hex number. It's not necessary to have the hex number corresponding to the binary number. Just to be for the same file.
>
>Vlad
>
>>It is a number in string format. Given a record with optional fields, each bit in the binary string corresponds to a field in the record. For example, if the fifth field is included, the fifth bit in the binary number is set on. If the fifth field is not included, the fifth bit in the binary number is set off. This binary number is then converted to hex and sent at the beginning of the record. When I get a reply record back, I have to do the opposite...convert from hex to binary to determine which fields have been sent. I may not always have 16 bits...it depends on the record type that is sent. Different record types have a different number of fields.
>>
>>Craig


Yes, your right. Here's an example: FEA0 = 1111111010100000......this is right out of the record layout documentation sent to me from the other company.

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform