[07 Sep 2006] Help with Seek()
Posted: Sat Jun 13, 2020 5:31 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 7 Sep 2006 20:50:29 -0600
Hi,
I'm trying to append data to the end of an existing file and thought that Seek() was the ticket. I thought that all I would have to do was the following:
The second readline causes a "Beyond EOF" Error and RAM:Test file only consists of the phrase "This is line 2". Any help would be appreciated. Thanks!
Nathan
Hi,
I'm trying to append data to the end of an existing file and thought that Seek() was the ticket. I thought that all I would have to do was the following:
Code: Select all
openfile(1,"RAM:Test",#MODE_WRITE)
writeline(1,"This is line 1")
closefile(1)
openfile(1,"RAM:Test",#MODE_WRITE)
seek(1,#EOF)
writeline(1,"This is line 2")
closefile(1)
openfile(1,"RAM:Test",#MODE_READ)
debugprint(readline(1))
debugprint(readline(1))
closefile(1)
Nathan