Page 1 of 1

Problems with DOS.library, adding to the end of a file

Posted: Sun Mar 10, 2024 6:25 pm
by phipslk
Hi,

I wanted to write code that appends lines to an existing textfile, but instead my code keeps overwriting the existing file. Can someone point me to my error please?

Code: Select all

				OpenFile(1,f$,#MODE_WRITE)
				Seek(1,#EOF,0)
				WriteLine(1,a.name)
				WriteLine(1,a.mail)
				WriteLine(1,a.prefix)
				WriteLine(1,a.serial)
				CloseFile(1)

Re: Problems with DOS.library, adding to the end of a file

Posted: Sun Mar 10, 2024 7:32 pm
by phipslk
seems I got the problem: changing to #MODE_READWRITE solved the problem