ASP AtEndOfLine 属性

定义和用法

AtEndOfLine 属性返回一个布尔值。True 指示文件指针紧靠行末标记之前,否则返回 False 。

Note:此属性仅工作于以只读方式打开的 TextStream 对象。

语法:

TextStreamObject.AtEndOfLine

实例

<%
dim fs,f,t,x
set fs=Server.CreateObject("Scripting.FileSystemObject") 
set f=fs.CreateTextFile("c:\test.txt")
f.write("Hello World!")
f.close

set t=fs.OpenTextFile("c:\test.txt",1,false)
do while t.AtEndOfLine<>true
  x=t.Read(1)
loop
t.close 
Response.Write("The last character is: " & x)
%>

输出:

The last character of the first line in the text file is: !
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南