到目前为止,这是我的代码:
Dim i As Integer
Dim stringArray() as String
stringArray = split("Hello|there", "|")
For i = 0 To stringArray.Length()
' Logic goes here
Next
Run Code Online (Sandbox Code Playgroud)
VB6似乎不喜欢我使用stringAray.Length()并给我一个编译错误消息,如'无效限定符'但是什么是迭代字符串数组的每个元素的正确方法?
Ale*_* K. 15
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
Run Code Online (Sandbox Code Playgroud)