Re: The Mother of All Euphoria Questions (Apologies in Advance)

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

----- Original Message -----
From: Stuart Brady <stu.doofer at CARE4FREE.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, January 23, 2000 8:26 AM
Subject: The Mother of All Euphoria Questions (Apologies in Advance)


> Hello,
>
> I think this question may have been asked before...   ;)
>
> I simply want to display a large text file on the screen. I read in the
text
> file line by line as in the library gets example.  I am unable to simply
> puts, printf etc the large sequence onto the display.
>
> I can get it to work using a loop but I did not think that would be
> necessary.

Try this:

sequence s
object line
integer fn
fn = open("text.txt","r")
s = {}

while 1 do
  line = gets(fn)
   if atom(line) then exit
   else s &= line
   end if
  end while
close(fn)

puts(1,s)


Regards,
Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu