填空题
在窗体上画一个命令按钮和一个文本框,其名称分别为Command1和Text1,然后编定如下事件过程: Private Sub Command1_Click() Dim inData As String Text1.Text:“” Open "d:/myfile.txt" For (10) As#1 Do While (11) Input #1,inData Text1.Text=Text1.Text+inData Loop Close#1 End Sub 程序的功能是,打开D盘根目录下的文本文件myfile.txt,读取它的全部内容并显示在文本框中。请填空。
1、
【正确答案】
1、[10]Input[11]not eof(1)
【答案解析】[解析] Open For Input表示读入;not eof(1)表示没有到文件尾。其中eof()若为真表示到文件尾,not eof是习惯用法。