dim tep as string
dim temp as string
dim i as integer
dim b as integer
dim rems as string
tep = rmsg
i = len(tep)
if i < 1 then exit function
b = i / 2
if i = b * 2 then
tep = left(tep, b * 2)
else
b = b – 1
tep = left(tep, b * 2)
end if
chg7 = ""
rems = ""
dim trint as integer
dim strtmp as string
trint = 1
strtmp = ""
for i = 1 to b
temp = "&h" & mid(tep, (i – 1) * 2 + 1, 2)
temp = d_to_b(val(temp)) 转二进制
if len(temp) < 8 then
temp = strpla(8 – len(temp)) + temp
end if
strtmp = mid(temp, trint + 1, 8 – trint) + rems
rems = mid(temp, 1, trint)
chg7 = chg7 & chrw(cint(val(b_to_d(strtmp))))
trint = trint + 1
if trint = 8 then
trint = 1
chg7 = chg7 & chrw(cint(val(b_to_d(rems))))
rems = ""
end if
next i
