QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The LOF function is used to find the length of an OPEN file in bytes.

Syntax

totalBytes& = LOF([#]fileNumber)

Description

Example(s)

Finding the number of records in a RANDOM file using a TYPE variable.


  OPEN file$ FOR RANDOM AS #1 LEN = LEN(Type_variable)
  NumRecords% = LOF(1) \ RecordLEN%

See Also