Converts integer decimals into Hexadecimals
Function Dec2Hex(intDEC)
dim strResult, intValue, intExp, arrDigits
arrDigits = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
strResult = ""
intValue = intDEC
intExp = 65536
while intExp >= 1
if intValue >= intExp then
strResult = strResult & arrDigits(int(intValue / intExp))
intValue = intValue - intExp * int(intValue / intExp)
Else
strResult = strResult & "0"
End if
intExp = intExp / 16
Wend
Dec2Hex = strResult
End Function
dim strResult, intValue, intExp, arrDigits
arrDigits = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
strResult = ""
intValue = intDEC
intExp = 65536
while intExp >= 1
if intValue >= intExp then
strResult = strResult & arrDigits(int(intValue / intExp))
intValue = intValue - intExp * int(intValue / intExp)
Else
strResult = strResult & "0"
End if
intExp = intExp / 16
Wend
Dec2Hex = strResult
End Function
intDEC
Views 4,009
Downloads 1,361
CodeID
DB ID