simple question

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

Please bear with me, as I'm a brand spankin' new user
of Euphoria.

All I'm trying to do is read a text file into a
sequence, and then turn around and print the sequence
onscreen.  I'm using the following code:

sequence buffer
object line
integer fn

fn = open("c:\\filename.txt","r")
if fn = -1 then
	puts(1,"Couldn't open file\n")
	abort(1)
end if

while 1 do
	line = gets(fn)
	if atom(line) then
		exit
	end if
	buffer = append(buffer,line)
end while

printf(1,"%s",{buffer})

When I try to run the above, I get the following error
message:

"sequence found inside character string"

What am I doing wrong?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu