Dec2Hex

Converts integer decimals into Hexadecimals

CodeFunctionName
What is this?

Public

Tested

Imported
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

intDEC

Views 3,999

Downloads 1,360

CodeID
DB ID

ANmarAmdeen
609
Revisions

v2.0

Sunday
July
29
2018