Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hexadecimal to asc
Message
From
16/06/2002 04:55:22
 
 
To
15/06/2002 10:11:28
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00668885
Message ID:
00668990
Views:
23
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform