BB___LOF

=LOF= toc

Description
> Returns the "length of file" as the number of bytes in the file referenced by #handle.

Syntax

 * 1) lof(//#handle//)

Hints
On file bigger then 4 Gb (2^32 bytes), lof(//#handle//) erroneously returns truncated value: actual_length MOD 2^32. In that case, FILES command allows to read right value.

Example
code format="lb" ' Assumes file named "test.txt" exists on disk: open "test.txt" for input as #1

' input$(#handle, n) returns the number of characters specified by the argument n. ' Therefore, the number of characters to return will be the length of the file in bytes. txt$ = input$(#1, lof(#1)) print "Contents of file: " print print txt$ close #1 code

Useful Functions
code format="lb" Place a useful function using this command here code