ASPAtEndOfStreamプロパティ_
❮完全なTextStreamオブジェクトリファレンス
AtEndOfStreamプロパティは、ファイルポインタがTextStreamファイルの最後にある場合はTrueを返し、そうでない場合はFalseを返します。
注: このプロパティは、読み取り用に開いているTextStreamオブジェクトでのみ機能します。
構文
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: !
❮完全なTextStreamオブジェクトリファレンス