[原创]数据类型转换?
在这里还想问个简单的问题!buf是一个九位的字符串,我把buf重新定义为动态数组:
ReDim ary(0 To Len(buf) - 1)
For i = 1 To Len(buf)
ary(i - 1) = Mid(buf, i, 1)
Next
For i = 0 To Len(buf) - 1
buf1 = buf1 + ary(i)
Next
txtReceive.Text = buf1
buf1 = ""
或者
ReDim ary(Len(buf) - 1)
For i = 1 To Len(buf)
ary(i - 1) = Mid(buf, i, 1)
Next
For i = 0 To Len(buf) - 1
buf1 = buf1 + ary(i)
Next
txtReceive.Text = buf1
buf1 = ""
怎么运行时ReDim ary(Len(buf) - 1)或者 ReDim ary(0 To Len(buf) - 1)出现下标越界错误?