Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

ReadList

Usage

ReadList["file"] reads all the remaining expressions in a file, and returns a list of them.
ReadList["file", type] reads objects of the specified type from a file, until the end of the file is reached. The list of objects read is returned.
ReadList["file", { ,  , ... }] reads objects with a sequence of types, until the end of the file is reached.
ReadList["file", types, n] reads only the first n objects of the specified types.


Notes

ReadList supports the same types as Read.
• The option setting RecordLists -> True makes ReadList create separate sublists for objects that appear in separate records.
• With the default setting RecordSeparators -> {"\n"}, RecordLists -> True puts objects on separate lines into separate sublists.
• The option RecordSeparators gives a list of strings which are taken to delimit records.
ReadList takes the same options as Read, with the addition of RecordLists.
• If file is not already open for reading, ReadList opens it, then closes it when it is finished. If the file is already open, ReadList does not close it at the end.
ReadList prints a message if any of the objects remaining in the file are not of the specified types.
ReadList["file", { , ... }] looks for the sequence of  in order. If the end of file is reached while part way through the sequence of  , EndOfFile is returned in place of the elements in the sequence that have not yet been read.
ReadList[stream] reads from an open input stream, as returned by OpenRead.
• See notes for Read.
• See also: Import, FindList, BinaryReadList.
• New in Version 1; modified in 2.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: