[填空题] 下列程序的功能是:将数据1,2,…,10写入顺序文件Base.txt中,请填空。 Private Sub Form_Click() Dim i As Integer   Open ____

15 查阅

[填空题] 下列程序的功能是:将数据1,2,…,10写入顺序文件Base.txt中,请填空。 Private Sub Form_Click() Dim i As Integer   Open ______ As #1   For i=1 To 10     Prin t#1,i   Next   Close #1 End Sub

参考答案:

"Base.txt" For Output

本题中以输出方式来打开文件,故要用"Open"Base.txt" For Output As #1"语句;向文件中写入数据用Print语句。

计算机考试