Re: Namespaces

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 8 Jun 2004, at 14:10, cklester wrote:

> 
> 
> posted by: cklester <cklester at yahoo.com>
> 
> Kat wrote:
> > 
> > On 8 Jun 2004, at 13:06, cklester wrote:
> > > 
> > > posted by: cklester <cklester at yahoo.com>
> > > 
> > > sequence myText
> > > myText = GetAFile( "GPL License.txt" )
> > 
> > Is GetAFile() different from the getf() in file.e ?
> 
> Kat, I couldn't find a "getf()" in file.e. Am I missing something?

global function getf(sequence filename)
object junk, file, filecontents
 file = open(filename,"r")
 if not equal(file,-1) then
   filecontents = ""
   junk = gets(file)
   while not equal(junk,-1) do
     filecontents &= junk
     junk = gets(file)
   end while
   close(file)
   return filecontents
 end if
 return -1
end function


I use it often, it's for win/dos text files, i don't know who wrote it. I spose
it
would work for *nix too. That function is in all my file.e going back to 1999.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu