实现上述功能的VB程序如下,但划线处代码有错,请改正。
Private Sub Command1_Click()
Dim s As String, resule As String, pos As String
Dim count As Integer, i As Integer
i = 1: count = 0
resule = "": pos = ""
Do While i <= Len(Text1.Text)
s = Mid(Text1.Text, i, Len(Text2.Text))
If s = Text2.Text Then
result = result + Text3.Textcount = count + 1
pos = pos + Str(count) ①_____________
i = i + Len(Text2.Text)
Else
result = result + Text2.Text ②_______________
i = i + 1
End If
Loop
Text4.Text = result
Text5.Text = Str(count)
Text6.Text = pos
End Sub
同类型试题
y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2
y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2