当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP AtEndOfStream 属性

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP AtEndOfStream 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 321 ::
收藏到网摘: n/a

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.
注意:这个属性仅对处于打开阅读状态中的文本对象有效。

Syntax
语法

TextStreamObject.AtEndOfStream

Example
举例

<%
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

登陆 | 还没注册?