09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Open Opens a file or serial channel<br />

Example<br />

Arguments<br />

Open is used to open a file or serial channel for reading or writing.<br />

VAR iodev logfile;<br />

.<br />

Open "flp1:LOGDIR" \File:= "LOGFILE1.DOC",logfile;<br />

The file LOGFILE1.DOC in unit flp1: (diskette), directory LOGDIR, is opened<br />

for writing. The reference name logfile is used later in the program when writing<br />

to the file.<br />

Open Object [\File] IODevice [\Read] | [\Write] | [\Append] | [\Bin]<br />

Object Data type: string<br />

The I/O object that is to be opened, e.g. "flp1:", "ram1disk:".<br />

[\File] Data type: string<br />

The name of the file. This name can also be specified in the argument Object,<br />

e.g. "flp1:LOGDIR/LOGFILE.DOC".<br />

IODevice Data type: iodev<br />

A reference to the file or serial channel to open. This reference is then used for<br />

reading from and writing to the file/channel.<br />

The arguments \Read, \Write, \Append and \Bin are mutually exclusive. If none of these<br />

are specified, the instruction acts in the same way as the \Write argument.<br />

[\Read] Data type: switch<br />

Opens a character-based file or serial channel for reading. When reading from a<br />

file, the reading is started from the beginning of the file.<br />

[\Write] Data type: switch<br />

Opens a character-based file or serial channel for writing. If the selected file<br />

already exists, its contents are deleted. Anything subsequently written is written<br />

at the start of the file.<br />

<strong>RAPID</strong> Reference Manual 8-Open-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!