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.

Example<br />

Limitations<br />

Error handling<br />

Predefined data<br />

Syntax<br />

text := ReadStr(infile);<br />

IF text = EOF THEN<br />

TPWrite "The file is empty";<br />

.<br />

Before using the string read from the file, a check is performed to make sure that<br />

the file is not empty.<br />

The function can only be used for files that have been opened for reading.<br />

If an error occurs during reading, the system variable ERRNO is set to<br />

ERR_FILEACC. This error can then be handled in the error handler.<br />

The constant EOF can be used to check if the file was empty when trying to read from<br />

the file or to stop reading at the end of the file.<br />

CONST string EOF := "EOF";<br />

ReadStr ’(’<br />

[IODevice ’:=’] <br />

[’\’Time’:=’ ]’)’<br />

A function with a return value of the type string.<br />

Related information<br />

Described in:<br />

Opening (etc.) serial channels <strong>RAPID</strong> Summary - Communication<br />

9-ReadStr-2 <strong>RAPID</strong> Reference Manual

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

Saved successfully!

Ooh no, something went wrong!