Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hexadecimal to asc
Message
De
16/06/2002 04:55:22
 
 
À
15/06/2002 10:11:28
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00668885
Message ID:
00668990
Vues:
22
>Hi all,
>Does anyone know if there's a window API for converting Hexadecimal values to ascII. Alternatively, is there a VFP6 function for this?
>Thanks
>Yau

Yau,

if you are dealing with strings
*---------------------------------------------------------------------
function	ath(x)
	local out, i
	out = ''
	for i = 1 to len(x)
		out = out + right(transform(asc(substr(x,i,1)),'@0'),2)
	endfor
	return	out
endfunc
*---------------------------------------------------------------------
function	hta(x)
	local out, i
	out = ''
	for i = 1 to len(x) step 2
		out = out + chr(	;
						16*atc(substr(x,i,1),'0123456789abcdef') + ;
						atc(substr(x,i+1,1),'0123456789abcdef') -17 ;
						)
	endfor
	return	out
endfunc
*---------------------------------------------------------------------
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform