contents.gifprev1.gifnext1.gif

READ_FILE

Description:

READ_FILE is used to add the contents of a named file to the current buffer at the current edit position.

Syntax:

string := READ_FILE (string)

Examples:

The following reads the file “input” into the current buffer at the current cursor position.

READ_FILE ("input");

The following reads the file “input” into the current buffer and returns the filename to the variable FILE$NAME.

FILE$NAME := READ_FILE ("input");

Errors:

TPU$_CLOSEIN Opened, read, but could not CLOSE file.

TPU$_CONTROLC Execution aborted by [CTRL-C].

TPU$_NOCACHE Insufficient memory for new cache.

TPU$_NOCURRENTBUF Not in a buffer.

TPU$_OPENIN Could not open READ file.

TPU$_READERR Opened but could not READ file.

Related Builtins:

CREATE_BUFFER

WRITE_FILE