到目前为止,这是我的代码:
Dim i As Integer Dim stringArray() as String stringArray = split("Hello|there","|") For i = 0 To stringArray.Length() '// Logic goes here Next
VB6似乎不喜欢我使用stringAray.Length()并给我一个编译错误消息,如’无效限定符’但是什么是迭代字符串数组的每个元素的正确方法?
ubound()返回上限;
Dim i As Long Dim stringArray(1) as String stringArray(0) = "hello" stringArray(1) = "world" For i = 0 To ubound(stringArray) msgBox(stringArray(i)) Next