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
这两条语句何解?请大家指点,谢谢了

解决方案 »

  1.   

    source = "East and west,home is best!": target = "st"
         location = 1: n = 0====其实是4条语句,可分解为:
     source = "East and west,home is best!"
     target = "st"
     location = 1
     n = 0: 在此处的作用就是分隔两条语句。没什么意义,可以节省一点行数。
      

  2.   

    就是2行语句写在同一行 中间用的分隔符。
    好像分行用的 _  符号一样。没有实际意义。但是不是同时执行的。也是分开执行,从左到右的顺序。 
    以前学习机上我就误解成同时执行,导致这样的错误:goto abc: number=5
      

  3.   

    此程序就是查找 target = "st" st在source 出现的次数!
       楼上的答案非常完美,fxy_2002(阿勇) 乃是顶尖高手!