发表于:2007/7/14 13:33:00
#0楼
Function chksum$(T$)
L = Len(T$)
a = 0
For j = 1 To L
TJ$ = Mid$(T$, j, 1)
a = Asc(TJ$) + a '
Next j '
SUM0$ = Hex$(a) '
If Len(SUM0$) = 1 Then SUM0$ = "0" + SUM0$ '
chksum$ = Right$(SUM0$, 2) '
End Function
这段程序看不懂,T$是怎样一个字符输入的,有哪个大侠可以逐行分析一下这个程序的吗?
L = Len(T$)
a = 0
For j = 1 To L
TJ$ = Mid$(T$, j, 1)
a = Asc(TJ$) + a '
Next j '
SUM0$ = Hex$(a) '
If Len(SUM0$) = 1 Then SUM0$ = "0" + SUM0$ '
chksum$ = Right$(SUM0$, 2) '
End Function
这段程序看不懂,T$是怎样一个字符输入的,有哪个大侠可以逐行分析一下这个程序的吗?