Read

WMA link


Read[stream]

reads the input stream and returns one expression.

Read[stream, type]

reads the input stream and returns an object of the given type.

Read[stream, type]

reads the input stream and returns an object of the given type.

Read[stream, Hold[Expression]]

reads the input stream for an Expression and puts it inside Hold.

type is one of:

Read with a Hold[Expression] returns the expression it reads unevaluated so it can be later inspected and evaluated:

Reading a comment, a non-expression, will return Hold[Null]

Multiple lines:

PutAppend
ReadList