Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hexagesimal
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01017471
Message ID:
01017492
Views:
18
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!
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform