

Description:
CREATE_BUFFER creates an new empty text buffer data structure. The buffer name
is based on the first parameter to CREATE_BUFFER and must be unique. Buffer
names in nu/TPU are case-sensitive, this is a difference from VAX/TPU. An
optional second parameter specifies a file to read into the buffer. An optional
third parameter sets some values of the new buffer to match an existing one. Using
this optional third parameter, the following values will be copied. All of the
following values can also be altered with the SET builtin.
Syntax:
buffer := CREATE_BUFFER ( BUFFER_NAME )
buffer := CREATE_BUFFER ( BUFFER_NAME, FILE_NAME )
buffer := CREATE_BUFFER ( BUFFER_NAME, FILE_NAME, DEFAULTS_BUFFER )
Examples:
The following creates a new buffer variable and assigns it to the variable
BUFFER$RETURN, labels the buffer main, and reads the file file.txt into the buffer.
BUFFER$RETURN := CREATE_BUFFER ("main", " ");
The following creates a new buffer, labels the buffer main, reads the file
FILE.TXT, and copies some values from the existing buffer OLD$BUFFER.
BUFFER$RETURN := CREATE_BUFFER ("main", "FILE.TXT", OLD$BUFFER );
Errors:
TPU$_DUPBUFNAME Buffer name already exists.
TPU$_OPENIN Could not open READ file.
Related Builtins:
CREATE_BUFFER
Direction
End of buffer text
Insert/overstrike mode
Key-maps
Margin actions
Maximum number of lines
Modify status
NO_WRITE
Right and left margins
Tab stops