Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

LOF

Description

LOF is a function that can be used to determine the size of files.

The input to LOF must be a handle of an open file or the reserved value 0. If 0 is given, LOF returns the media size in Kbytes.

Example

This program checks if disk is present. If so, it prints the size of the disk.

outmode -2
let a = lof(0)

if LASTERR <> 0 then
   print "no disk"
   end
end if

print "the disk size is: ";
print a

end

Remarks

Because the return value of LOF is a signed 32 bit integer in the range from –2,147,483,648 to +2,147,483,647, very large disks may produce negative or incorrect results. See also the page describing the LOC function.