ASP Columnプロパティ


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

Column プロパティは、入力ストリーム内の現在の文字位置の列番号を返します。

注意:このプロパティは、改行文字(new line character)が書き込まれた後は 1 になります(他の文字が書き込まれる前)。

構文

TextStreamObject.Column

例

<%
dim fs,f,t,x,y
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)
  y=t.Column-1
loop
t.close
Response.Write("The last character in the text file is: " & x)
Response.Write("<br> at character position: " & y)
%>

出力:

The last character in the text file is: !
at character position: 12


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