ASP Column 属性

定义和用法

Column 属性返回输入流中当前字符位置的列号。

注释:此属性在新行字符 (new line character ) 被写入之后为 1 (在其他字符被写入前)。

语法:

TextStreamObject.AtEndOfStream

实例

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