lang • lof


Length = Lof ( Stream AS Stream ) AS Long

Returns the length of the opened stream Stream.


hFile = Open sFileName For Read
Print "File length is "; Lof(hFile)

If the stream is not a file, i.e. a Process or a Socket, then it returns the number of bytes that can be read at once.

Public Sub Process_Read()

  Dim sBuffer As String

  Print "I can read "; Lof(hLAST)
  ' Read them
  Read #hLAST, sBuffer, Lof(hLAST)


See also