To read in expressions from a file, one can do ReadList[file, Expression, 3]. How to do the opposite, i.e. remove a number of expressions from a file, modifying the file on the disk?
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
||||
|
|
In a Sequential file you can´t delete entries. The only option is shifting the "tail" of the file upwards.
|
|||||||||||||||
|
|
A filtered stream reading function:
Define a stream to read.
Create a reader on that stream.
Read from the filtered stream reader.
Which returns:
|
|||||||||||
|

