当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP AtEndOfStream 属性
The AtEndOfStream property returns True if the file pointer is at the end of a TextStream file, and False if not.
如果文件指示器(file pointer)已经在已经位于文本的最末位置了,那么ASP AtEndOfStream属性将显示True逻辑真;否则将显示False逻辑假。
Note: This property will only work on a TextStream object that are open for reading.
注意:这个属性仅对处于打开阅读状态中的文本对象有效。
| TextStreamObject.AtEndOfStream |
<%
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.AtEndOfStream<>true x=t.Read(1)
loop
t.close
Response.Write("The last character is: " & x)
%> Output: The last character in the text file is: ! |
评论 (0) All