Reading external files

Dan hi could anyone help me with a procedure intended to
read from an external file, say somefile.txt?
the reason i ask is because the example offered in the
tutorial doesn't seem to read anything (although it writes
to the file). Must the buffer be local or string? thanks