主题:不明语句,请大家指点
Private Sub Form_Load()
Dim location As Integer, n As Integer, source As String, target As String
Show
source = "East and west,home is best!": target = "st"
location = 1: n = 0
location = InStr(location, source, target) + 1
Do While location > 1
n = n + 1
location = InStr(location, source, target) + 1
Loop
Print n
End Sub
其中source = "East and west,home is best!": target = "st"
location = 1: n = 0
这两条语句何解?请大家指点,谢谢了
Dim location As Integer, n As Integer, source As String, target As String
Show
source = "East and west,home is best!": target = "st"
location = 1: n = 0
location = InStr(location, source, target) + 1
Do While location > 1
n = n + 1
location = InStr(location, source, target) + 1
Loop
Print n
End Sub
其中source = "East and west,home is best!": target = "st"
location = 1: n = 0
这两条语句何解?请大家指点,谢谢了