POSITION:028,114
COLOUR:STANDARD
TEXT:00,If your intention is to treat a file or device as a source of output,
TEXT:16,and do not intend to accept any data from it, then you want to open this
TEXT:16,file or device in "write" mode. This means the program can only send
TEXT:16,data to the file or device, not read from it. In the case of a file,
TEXT:16,opening in "write" mode will destroy any data stored in the file.
TEXT:16,If you wish to preserve the existing data in the file when outputting
TEXT:16,data to it, you can open the file in "append" mode, a variation of
TEXT:16,the "write" mode. "append" mode allows output data to be tagged at
TEXT:16,the end of the existing file data. While a device must exist in order to
TEXT:16,use "write" and "append", a file is created if it does not exist.
TEXT:32,If you want to work with devices and files as both a source of data
TEXT:16,input and a place to send data as output, then you want to open in
TEXT:16,an "update" mode. This means programs can both send and receive data
TEXT:16,from files and devices. A file or device must exist in order to
TEXT:16,open it in "update" mode.
