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:
01017492
Vues:
19
Gabriel,

As far as I know, the word "Hexagesimal" is the correct Greek word that we use as "hexadecimal" today. If it is correct, then the hexadecimal representation for positive numbers less than 4,294,967,296 would be as Sergey told. For bigger positive numbers you need to use something like this:
Procedure yDec2Hex
LPARAMETERS pnDecimal

retval=""
DO WHILE pnDecimal#0
	retval = iHdigit(pnDecimal % 16) + retval
	pnDecimal=FLOOR(pnDecimal / 16)
ENDDO

?retval

RETURN retval
*---------------------------------
Procedure iHdigit
LPARAMETERS pn
DO case
CASE pn<10
	RETURN TRANSFORM(pn)
OTHERWISE
	RETURN CHR(pn + 55)
endcase
*----------------------------

Good Luck

>
? TRANSFORM(12345, "@0")
>>Hi! from santo domingo.
>>
>>I need to know how to convert a number to hexagesimal.
>>
>>please some example would be welcoming!
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform