首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

总提示上标过界,百度了没找到对应的

2012-08-10 
总提示下标过界,百度了没找到对应的Public Function frame_very(pbuf() As Byte, dlen As Byte) As Boolea

总提示下标过界,百度了没找到对应的
Public Function frame_very(pbuf() As Byte, dlen As Byte) As Boolean
  Dim rtn As Boolean
  Dim ppbuf() As Byte
  Dim i As Integer
  rtn = False
  For i = 0 To 2
  ppbuf(i) = pbuf(i + 1)'就是后面这个数组显示下标过界
  Next

[解决办法]
用ubound判断下pbuf的上限

热点排行