Mathematica 9 is now available

SkipClose

OpenRead

FilledSmallSquareOpenRead["file"] opens a file to read data from, and returns an InputStream object.

FilledSmallSquareOpenRead prepares to read from a file, starting at the beginning of the file.

FilledSmallSquare On systems that support pipes, OpenRead["!command"] runs the external program specified by command, and opens a pipe to get input from it.

FilledSmallSquare If OpenRead does not succeed in opening a particular file or pipe, it generates a message, and returns $Failed.

FilledSmallSquareOpenRead resolves file names according to the procedure described in Section A.6.1.

FilledSmallSquare The function ReadList automatically opens files or pipes that it needs.

FilledSmallSquareOpenRead returns InputStream["name", n], where name is the full name of a file or command, and n is a serial number that is unique across all streams opened in the current Mathematica session.

FilledSmallSquare Setting the option DOSTextFormat->True causes all input to be treated as coming from a text-mode file on an MS-DOS or related system. This means that \r\n pairs are interpreted as single newlines, and ControlKeyLeftModifiedZRightModified is interpreted as EndOfFile.

FilledSmallSquare See The Mathematica Book: Section 2.11.8.

FilledSmallSquare See also: Close, Read, ReadList, Streams, LinkCreate.

SkipClose



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.