OPENAPPEND

Synopsis
OPENAPPEND filename
(OPENAPPEND filename binarymode)
Description

Opens the file named filename for writing. If the file by the given filename already exists, the write position is initially set to the end of the old file, so that newly written data is appended to it.

filename can also be the reserved word "clipboard to write data to the clipboard just like a file.

The binarymode is a boolean value (TRUE or FALSE). If binarymode is FALSE or not given, then the file is written as a text file. That is, the end-of-line sequence is converted from LF to CRLF. If binarymode is TRUE, then the file is written as a binary file. That is, no end-of-line sequence conversion is performed.

Example
OPENWRITE "dummy.fil
SETWRITE "dummy.fil
PRINT "Hello
SETWRITE []
CLOSE "dummy.fil

OPENAPPEND "dummy.fil
SETWRITE "dummy.fil
PRINT [Good Bye]
SETWRITE []
CLOSE "dummy.fil

OPENREAD "dummy.fil
SETREAD "dummy.fil
REPEAT 2 [SHOW READLIST]
[Hello]
[Good Bye]
SETREAD []
CLOSE "dummy.fil
See Also
CLOSE

SourceForge.net Logo