{{fbdoc item="title" value="LOF"}}----
Returns the length of an open disk file

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Lof** ( [[KeyPgByval|byval]] //filenum// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
##
{{fbdoc item="usage"}}##
	//result// = **Lof**( //filenum// )
##
{{fbdoc item="param"}}
	##//filenum//##
		The file number of an open disk file.

{{fbdoc item="ret"}}
	The length in bytes of an open disk file.

{{fbdoc item="desc"}}
	Returns the length, in bytes, of a file opened previously with ##[[KeyPgOpen|Open]]## using the given ##//filenum//##.
	
	With ##[[KeyPgOpenCom|Open Com]]## it returns the length of the data pending to be read in the receive buffer.

{{fbdoc item="ex"}}
	{{fbdoc item="filename" value="examples/manual/fileio/lof.bas"}}%%(freebasic)
dim f as long
f = freefile
open "file.ext" for binary as #f
print lof(f)
close #f
%%
{{fbdoc item="diff"}}
	- None

{{fbdoc item="see"}}
	- ##[[KeyPgLoc|Loc]]##
	- ##[[KeyPgEof|Eof]]##
	- ##[[KeyPgOpen|Open]]##

{{fbdoc item="back" value="CatPgFile|File I/O Functions"}}