DIAdem Help

Property: AtEndOfLine for TextStream

  • Updated2024-09-12
  • 1 minute(s) read

Property: AtEndOfLine for TextStream

Checks whether the read pointer is just before the end of line of a TextStream file.

Object.AtEndOfLine
ObjectTextStream
Object with this property
Object.AtEndOfLineBoolean value with read access
The value is True if the read pointer is before the end of line character, otherwise the value is False.

The following example returns the last character of the first line of a file:

Function ReadEndOfLine(sFile)
  Const ForReading = 1
  Dim fso, oMyFile, sOutput
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFile = fso.OpenTextFile(sFile, ForReading, False)
  Do While oMyFile.AtEndOfLine <> True
    sOutput = oMyFile.Read(1)
  Loop
  oMyFile.Close
  ReadEndOfLine = sOutput
End Function

Log in to get a better experience