程序的功能是:在文本框Text1中输入一行字符串,单击“计算”按钮,统计Text1中小写字母的个数并在Text2中
OptionBase1SubSaveData()DimsAsStringOpenApp.Path&"\"&"PROGIN.DAT"ForInputAs#1OpenApp....
Option Base 1
Sub SaveData()
Dim s As String
Open App.Path & "\" & "PROGIN.DAT" For Input As #1
Open App.Path & "\" & "PROGOUT.DAT" For Output As #2
For i = 1 To 5
Input #1, s
Print #2, "第" & i & "行小写字母的个数为:" & Fun(s)
Next i
Close #1
Close #2
End Sub
Function Fun(s As String)
'********begin********
'*********end*********
End Function
Private Sub Command1_Click()
d = Fun(Text1.Text)
Text2.Text = "小写字母的个数为:" & d
SaveData
End Sub 展开
Sub SaveData()
Dim s As String
Open App.Path & "\" & "PROGIN.DAT" For Input As #1
Open App.Path & "\" & "PROGOUT.DAT" For Output As #2
For i = 1 To 5
Input #1, s
Print #2, "第" & i & "行小写字母的个数为:" & Fun(s)
Next i
Close #1
Close #2
End Sub
Function Fun(s As String)
'********begin********
'*********end*********
End Function
Private Sub Command1_Click()
d = Fun(Text1.Text)
Text2.Text = "小写字母的个数为:" & d
SaveData
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询