OPENREAD

Synopsis
OPENREAD filename
(OPENREAD filename binarymode)
Description

Opens the file named filename for reading. The read position is initially at the beginning of the file.

The filename can also be the reserved word "clipboard to read data from 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 read as a text file. That is, the end-of-line sequence is converted from CRLF to LF. If binarymode is TRUE, then the file is read as a binary file. That is, no end-of-line sequence conversion is performed.

Example
OPENWRITE "dummy.fil
SETWRITE "dummy.fil
PRINT "Hello
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