add lof() to fileblock.yab

This commit is contained in:
Jim 2015-06-11 12:41:05 -07:00
parent 3a7106136f
commit 7c924ab138
2 changed files with 16 additions and 2 deletions

View File

@ -154,6 +154,20 @@ rec=rec+1
return rec
end sub
export sub lof(filehandle)
// returns the number of blocks in the file.
local x
filename$=f$(filehandle,0,0)
x=open(filename$)
seek #x, 0, "end"
ret=tell(#x)
if ret=0 return ret
ret= ret/(f(filehandle,51)+1)
ret=int(ret)
return ret
end sub
sub blank$(num)
local s$

View File

@ -2,8 +2,8 @@ The files in this folder are yab libraries, to use them, copy to your project fo
~/config/settings/yab
then use the include statement in your project.
then use the import statement in your project.
Example:
include Toolbar
import Toolbar