Open In App

ASP TextStream.AtEndOfLine Property

Last Updated : 21 Sep, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The ASP AtEndOfLine Property is used to return a Boolean value which specifies that whether the file pointer position at the end of the line in a Textstream file. It returns true if the file pointer positioned at the end of the line otherwise it returns false. 

Note: This property will only work on a TextStream object that is open for reading.

Syntax:

TextStreamObject.AtEndOfLine

Example: Below code illustrates the ASP AtEndOfLine Property.

ASP




<%
dim fs,f,t,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("d:\GFG.txt")
f.write("Hello GeeksForGeeks")
f.close
 
set t=fs.OpenTextFile("d:\GFG.txt",1,false)
do while t.AtEndOfLineG<>true
 x=t.Read(1)
loop
t.close
Response.Write("The last character in the line is: " & x)
%>


Output:

The last character in the line is s. 

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads