openUpdate

Help Contents Communication File opening openUpdate
openAppendBin openUpdateBin

openUpdate filename


command. Opens the named file for reading and writing. The read and write position is initially set to the end of the old file, if any. Note: each open file has only one position, for both reading and writing. If a file opened for update is both Reader and Writer at the same time, then setReaderPos will also affect WriterPos and vice versa. Also, if you alternate reading and writing the same file, you must SETREADERPOS between a write and a read, and setWriterPos between a read and a write.

Example:

openUpdate "temp.txt
setReader "temp.txt
pr readlist		;This is a test file!
pr readlist		;and a line more
setReader []
close "temp.txt

See also:

References:

openAppendBin openUpdateBin