ASP AtEndOfStreamプロパティ


TextStream 对象参考手册完全な TextStream オブジェクトリファレンス

ファイルポインタがTextStreamファイルの末尾にある場合、AtEndOfStreamプロパティは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)
%>

出力:

The last character in the text file is: !


TextStream 对象参考手册完全な TextStream オブジェクトリファレンス その他の拡張機能