欢迎光临
我们一直在努力

VB PDU mode 7 bit 解码-.NET教程,VB.Net语言

建站超值云服务器,限时71元/月

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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » VB PDU mode 7 bit 解码-.NET教程,VB.Net语言
分享到: 更多 (0)

相关推荐

  • 暂无文章