(35)在C盘当前文件夹下有一个已经建立好的顺序文件Alph.txt,文件内容为只含有字母的一个字符去、串(有双引号界定符)。单击窗体,打开Alph.txt文件,读取字符串显示在文本框Text1中,最后将重新排列的字符串存入AipO.txt文件中(无双引号界定符)。请选择横线处合适的语句 Private Sub Fom_Load() Dim StrIn As String,StrOut As String Open"C/:Alph.txt"For Input As#1 ______ Close Text1.Text=StrIn ______ Text2.Text=StrOut Open"C/:AlpO.txt"For Output As#2 ______ Close End Sub Private Function StrSort(s As String)As String Dim sArr()As String*1,i As Integer,j As Integer,n As Integer Dim t As String*1 n=Lem(s) Redim sArr(n) For i=1 To n sArr(i)=Mid(s,i,1) Next i For i=1 To n-1 For j=i+1 To n If sArr(i)sArr(j)Then t=sArr(i):sArr(i)=sArr(j):sArr(j)=t End If Next j,i For i=1 To n StrSort=StrSortsArr(i) Next i End FunctionA.Input#1,StrIn StrIn Print#2,StrOut B.Input#1,StrIn StrOut(StrIn) Print#2,StrOutC.Input#2,StrIn StrOut(StrIn) Print#1,StrOutD.Input#1,StrIn StrOut(StrIn) Input#2,StrOut
(35)在C盘当前文件夹下有一个已经建立好的顺序文件Alph.txt,文件内容为只含有字母的一个字符去、串(有双引号界定符)。单击窗体,打开Alph.txt文件,读取字符串显示在文本框Text1中,最后将重新排列的字符串存入AipO.txt文件中(无双引号界定符)。请选择横线处合适的语句 Private Sub Fom_Load() Dim StrIn As String,StrOut As String Open"C/:Alph.txt"For Input As#1 ______ Close Text1.Text=StrIn ______ Text2.Text=StrOut Open"C/:AlpO.txt"For Output As#2 ______ Close End Sub Private Function StrSort(s As String)As String Dim sArr()As String*1,i As Integer,j As Integer,n As Integer Dim t As String*1 n=Lem(s) Redim sArr(n) For i=1 To n sArr(i)=Mid(s,i,1) Next i For i=1 To n-1 For j=i+1 To n If sArr(i)>sArr(j)Then t=sArr(i):sArr(i)=sArr(j):sArr(j)=t End If Next j,i For i=1 To n StrSort=StrSort&sArr(i) Next i End FunctionA.Input#1,StrIn StrIn Print#2,StrOut B.Input#1,StrIn StrOut(StrIn) Print#2,StrOutC.Input#2,StrIn StrOut(StrIn) Print#1,StrOutD.Input#1,StrIn StrOut(StrIn) Input#2,StrOut