1. File output
- Posted by Jacen <pip at mail.sylvancomputers.com> Nov 29, 2004
- 478 views
How do I output to a file without overwriting it? I used open(file,"u")--update puts(fn,"blah") and it overwrites what is already in the file
2. Re: File output
- Posted by cklester <cklester at yahoo.com> Nov 29, 2004
- 470 views
Jacen wrote: > > How do I output to a file without overwriting it? I used > open(file,"u")--update > puts(fn,"blah") > and it overwrites what is already in the file you need to use open(file,"a") for "append." -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
3. Re: File output
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 29, 2004
- 449 views
You need to use append mode. Update mode allows you to open a file for reading and writing, the position starts at the beginning of the file. Append is for adding to an existing file (write only). The position starts at the end of the file. Try: fn = open(file,"a") puts(fn,"blah") On Sun, 28 Nov 2004 17:18:49 -0800, Jacen <guest at rapideuphoria.com> wrote: > > posted by: Jacen <pip at mail.sylvancomputers.com> > > How do I output to a file without overwriting it? I used > open(file,"u")--update > puts(fn,"blah") > and it overwrites what is already in the file > > > > -- MrTrick
4. Re: File output
- Posted by CoJaBo <CoJaBo_EUforum_Address at CJBN.net> Nov 29, 2004
- 470 views
Jacen wrote: > > How do I output to a file without overwriting it? I used > open(file,"u")--update Re-read the docs on open(), you need to use a, not u. > puts(fn,"blah") > and it overwrites what is already in the file >