Ò»¸ö¶àÐеÄtext Èç¹û°ÑÿһÐзÅÈëÒ»¸ö×Ö·û´®ÉÏÄØ?lineinput VB code: Private Sub Command1_Click() Dim TextLine
Open "d:\test.txt" For Input As #1 ' ´ò¿ªÎļþ¡£ Do While Not EOF(1) ' Ñ»·ÖÁÎļþβ¡£ Line Input #1, TextLine ' ¶ÁÈëÒ»ÐÐÊý¾Ý²¢½«Æ丳Óèij±äÁ¿¡£ Debug.Print TextLine ' ÔÚµ÷ÊÔ´°¿ÚÖÐÏÔʾÊý¾Ý¡£ Loop Close #1 ' ¹Ø±ÕÎļþ¡£
End Sub
»òÓÃfilesystem¡£teststream¡£readline VB code: Private Sub Command1_Click() Dim TextLine(100) as string i=0 Open "d:\test.txt" For Input As #1 ' ´ò¿ªÎļþ¡£ Do While Not EOF(1) ' Ñ»·ÖÁÎļþβ¡£ i=i+1 Line Input #1, TextLine(i) ' ¶ÁÈëÒ»ÐÐÊý¾Ý²¢½«Æ丳Óèij±äÁ¿¡£ Debug.Print TextLine(i) ' ÔÚµ÷ÊÔ´°¿ÚÖÐÏÔʾÊý¾Ý¡£ Loop Close #1 ' ¹Ø±ÕÎļþ¡£