unHex a number

Blitz3D Forums/Blitz3D Programming/unHex a number

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thankyew.... That is a hairy piece of math there! I appreciate it!

Now when I do this:
ascii$=Hex$(250000)
Print ascii$
Print hex2dec(ascii$)
Input
End

Function hex2dec(hexin$)
	Local c, dec, hexval$ = "0123456789ABCDEF"
	For c=1 To Len(hexin$)
	dec = (dec Shl 4) Or (Instr(hexval$, Upper$(Mid$(hexin$, c, 1))) - 1)
	Next
	Return dec
End Function
I don't see it work... Hmmm... Maybe if I renamed the $ variable to match your variable name...

OK itis 2:46AM here and I apologize... it was working GREAT but my brain sin't... manaña amigos
RZ