Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alloc an int in CLSHEAP
Message
 
 
À
30/07/2001 08:31:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00537090
Message ID:
00537140
Vues:
13
>BINTOC() will convert an integer to a 1, 2, or 4-byte character. Default 4 (if no second parameter).

Unfortunately, BINTOC() isn't usable when dealing with C-type WORD/DWORD for two reasons.

1. In order to limit the valid return values, BINTOC() starts the high-order bit at character 128. If you pass this value, it will read it incorrectly and most likely fail.
2. It returns the character representation in the wrong order. It returns values translated high order to low order. In this way, 1000 means (1*10^3)+(0*10^2)+(0*10^1)+0. For library routines to read it, it needs to be the other way around. 1000 should mean 1+(0*10^1)+(0*10^2)+(0*10^3).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform