窗体上有一个命令按钮,数据文件data.txt的内容如下: "语文" "2001", 87 "数学" "2002", 75 "英语" "2003", 92 "体育" "2004", 66

admin2009-02-13  29

问题 窗体上有一个命令按钮,数据文件data.txt的内容如下:
       "语文" "2001", 87
       "数学" "2002", 75
       "英语" "2003", 92
       "体育" "2004", 66
         Type bs
               aa As String * 2
               bb As String * 4
               cc As Integer
         End Type
         Private Sub command1_Click(
               Dim xs As bs
               Dim fl As Integer
               fl = FreeFile
               Open "d:\data.txt" For Input As #fl
               Do While Not EOF(fl)
                     Input #fl,  xs.aa,  xs .bb,  xs.cc
      List1.AddItem xs.bb
      List1.AddItem xs.aa
      List1.AddItem xs.cc
   Loop
      Print  EOF(fl)
   Close
   End Sub
   问:在列表框中第一行、第三行、第四行的内容是【  】、【  】、【  】。窗体上打印出的是【  】。

选项

答案2001,87,2002

解析 当文件指针指向文件的结尾,EOF函数返回True。
转载请注明原文地址:https://kaotiyun.com/show/sb1p777K
0

最新回复(0)