Re: Constructing sequences

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

Gordon Webster wrote:

[snip]

> I am reading the data records in from a file so I don't see an
> obvious way I could build the whole sequence at once. Wouldn't
> I have to temporariliy store the records in another sequence,
> incurring the same 'append' overhead anyway?

[snip]

Gordon, try please:

-- file aa.ex
include file.e

function Get_Big_File(object name)
  object file
     file = dir(name)
       file = file[1][3]
         file = repeat(0, file)
           name = open(name, "rb")
             for i=1 to length(file) do
                file[i] = getc(name)
             end for
             close(name)
  return file
end function

puts(1, Get_Big_File("aa.ex"))
-- end of file aa.ex


Just copy/paste this code into NotePad,
save it as aa.ex, and then run it from
ed.ex.

Good Luck!

Regards,
Igor Kachan
kinz at peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu