Visual Basic Scripting Edition | 語言參考 |
AtEndOfLine 屬性TextStream 文件中,如果文件指針指向行末標(biāo)記,就返回 True;否則如果不是只讀則返回 False。 object.AtEndOfLine
object 應(yīng)為 TextStream 對象的名稱。 說明AtEndOfLine 屬性僅應(yīng)用于以讀方式打開的 TextStream 文件,否則會出現(xiàn)錯誤。 下列代碼舉例說明如何使用 AtEndOfLine 屬性: Function ReadEntireFile(filespec)
Const ForReading =1
Dim fso, theFile, retstring
Set fso =CreateObject("Scripting.FileSystemObject")
Set theFile =fso.OpenTextFile(filespec, ForReading, False)
Do While theFile.AtEndOfLine <> True
retstring =theFile.Read(1)
Loop
theFile.Close
ReadEntireFile =retstring
End Function
請參閱AtEndOfStream 屬性 | Column 屬性 | Line 屬性 應(yīng)用于:TextStream 對象
返回首頁 |