[求助]如何将一个大数转化为十六进制数?
如题,将十进制的“4294967295”转化为十六进制的“FFFFFFFF”,应该怎么做啊?
[此贴子已经被作者于2007-6-30 13:54:55编辑过]
function ToHex(Num as currency) as string
dim n as currency
dim i as currency
dim j as currency
dim buf as string,Str1 as string
do while n<>0
j=int(n/16)
i=n-j*16
n=j
select case i
case is < 10
buf=str(i)
case 10
buf="A"
case 11
buf="B
case 12
buf="C
case 13
buf="D
case 14
buf="E
case 15
buf="F"
end select
str1=Trim(buf) & Trim(str1)
loop
ToHex=str1
end function