add lof() to fileblock.yab
This commit is contained in:
parent
3a7106136f
commit
7c924ab138
@ -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$
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user