Re: get() gets() etc...
- Posted by "Graeme." <hmi at POWERUP.COM.AU> Jun 11, 1998
- 840 views
>In BASIC there is a LOF() function which returns the length of the file and a (assumes file fn opened as binary) integer junk,LOF junk=seek(fn,-1) LOF=where(fn) >BLOAD which lets you quickly load a whole file or a large part into memory >(starting at the beginning, unfortunately). I have no idea if Euphoria >supports this, but it would seem pretty necessary if we want any kind of >speed. function bload(sequence path) integer fn,c sequence r r={} fn=open(path,"rb") c=getc(fn) while c!=-1 do r=r&c c=getc(fn) end while return r end function ----------------------------------------------------