我的这段代码怎么老是有问题!
Private Function parse_string(szStr() As Byte, crllen As Integer) As Integer Dim i As Integer
Dim j As Integer
For i = 0 To crllen
If Asc("\") <> Asc(szStr(i)) Then一执行到上面这一句就提示出错" Subscript out of range"
到底是怎么回事啊!
还请大家多帮忙啊!
Private Function parse_string(szStr() As Byte, crllen As Integer) As Integer Dim i As Integer
Dim j As Integer
For i = 0 To crllen
If Asc("\") <> Asc(szStr(i)) Then一执行到上面这一句就提示出错" Subscript out of range"
到底是怎么回事啊!
还请大家多帮忙啊!
asc应该带string型的变量,结果你传了一个byte的东西进去
If Asc("\") <> Asc(szStr(i)) Then这样试一下!第二个参数感觉没有必要吧~~~~~
If Asc("\") <> szStr(i) Then
应该没问题了。
If "\" <> chr(szStr(i)) Then