ASP AtEndOfLine พ ร็อพเพอร์ ตี้
❮ อ้างอิงวัตถุ TextStream ที่สมบูรณ์
คุณสมบัติ AtEndOfLine ส่งกลับค่าบูลีน True ระบุว่าตัวชี้ไฟล์อยู่ในตำแหน่งก่อนเครื่องหมายสิ้นสุดบรรทัดในไฟล์ TextStream มิฉะนั้นจะส่งกลับค่าเท็จ
หมายเหตุ: คุณสมบัตินี้จะทำงานบนวัตถุ TextStream ที่เปิดสำหรับการอ่านเท่านั้น
ไวยากรณ์
TextStreamObject.AtEndOfLine
ตัวอย่าง
<%
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.AtEndOfLine<>true
x=t.Read(1)
loop
t.close
Response.Write("The last character is: " & x)
%>
Output:
The last character of the first line in the text file is: !
❮ อ้างอิงวัตถุ TextStream ที่สมบูรณ์