【Asp】ASP 十六进制转换为二进制

  • A+
所属分类:lcx

ASP 十六进制转换为二进制:

Function HEX_to_BIN(Hex)
Dim i , B
    Hex = UCase(Hex)
    For i = 1 To Len(Hex)
        Select Case Mid(Hex, i, 1)
            Case "0": B = B & "0000"
            Case "1": B = B & "0001"
            Case "2": B = B & "0010"
            Case "3": B = B & "0011"
            Case "4": B = B & "0100"
            Case "5": B = B & "0101"
            Case "6": B = B & "0110"
            Case "7": B = B & "0111"
            Case "8": B = B & "1000"
            Case "9": B = B & "1001"
            Case "A": B = B & "1010"
            Case "B": B = B & "1011"
            Case "C": B = B & "1100"
            Case "D": B = B & "1101"
            Case "E": B = B & "1110"
            Case "F": B = B & "1111"
        End Select
    Next

    While Left(B, 1) = "0"
        B = Right(B, Len(B) - 1)
    Wend

    HEX_to_BIN = B
End Function

response.write HEX_to_BIN(line)

文章来源于lcx.cc:【Asp】ASP 十六进制转换为二进制

相关推荐: 【视频】(俄罗斯)雅马哈R1暴走 - 华沙的高速公路狂飙

新浪 优酷 视频,(俄罗斯)雅马哈R1暴走,华沙的高速公路狂飙。     好家伙,看的手里直冒汗……     视频,牛B,摩托,(俄罗斯)雅马哈R1暴走,华沙的高速公路狂飙,莫斯科公路亡命飞车。     上边两个内容一样,一个是新浪,一个是优酷,清晰度也都差不…

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: