源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

VBS教程:属性-AtEndOfLine 属性

  • 时间:2022-08-02 15:18 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:VBS教程:属性-AtEndOfLine 属性

AtEndOfLine 属性

[b]TextStream[/b] 文件中,如果文件指针指向行末标记,就返回 [b]True[/b];否则如果不是只读则返回 [b]False[/b]。 [code][i]object[/i].AtEndOfLine[/code] object 应为 TextStream 对象的名称。 [h3]说明[/h3][b]AtEndOfLine[/b] 属性仅应用于以读方式打开的 [b]TextStream[/b] 文件,否则会出现错误。 下列代码举例说明如何使用 [b]AtEndOfLine[/b] 属性:
[code]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[b].AtEndOfLine[/b] <> True    retstring = theFile.Read(1)  Loop  theFile.Close  ReadEntireFile = retstringEnd Function[/code]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部