Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hexagesimal
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01017471
Message ID:
01018344
Vues:
10
I have used this function to convert a number to hexedecimal. I hope it proves useful to you.

notitia abunde dominatus (knowledge is power)
Jeff
FUNCTION f_CreateHex
	LPARAMETERS nCharactureToConvert

	cRight = "0"
	nRight = 0

	cLeft = "0"
	nLeft = 0

	* Set positioning refrences
	lFirstRun = .T.

	* Loop to count up to the value needed
	FOR nTempCounter2 = 0 TO nCharactureToConvert

		IF ! lFirstRun
			IF nRight < 15
				nRight = nRight + 1
			ELSE
				nLeft = nLeft + 1
				nRight = 0
			ENDIF
		ELSE
			lFirstRun = .F.
		ENDIF

	NEXT nTempCounter2

	cTempString = "0123456789ABCDEF"
	cResults =  SUBSTR(cTempString, nLeft + 1,1) + SUBSTR(cTempString, nRight + 1,1)

	RETURN cResults
>Hi! from santo domingo.
>
>I need to know how to convert a number to hexagesimal.
>
>please some example would be welcoming!
>
>Thx.
Jeff Pearce
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform