Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU CREATE_BUFFER — VMS 5.5

 CREATE_BUFFER

    Creates a new buffer -- a work space for editing text, storing data,
    and other purposes.

 Syntax

    [buffer :=] CREATE_BUFFER (string1 [, [string2] [, [buffer]
                              [, string3]]])

 Parameters

    string1    The name of the buffer you want to create.

    string2    Optionally, specifies the input file for the buffer.  If you
               do not specify an input file, you create an empty buffer.

    buffer     The buffer you want to use as a template for the buffer
               being created.  The new buffer has the same attributes (such
               as tabs, margins, etc.) as the template buffer.  For a list
               of all the attributes inherited by the new buffer, see the
               VAX Text Processing Manual's description of the
               CREATE_BUFFER built-in.

    string3    The name of the journal file to be used with the buffer.
               Note that VAXTPU does not copy the journal file name from
               the template buffer.  Instead, CREATE_BUFFER uses string3 as
               the new journal file name.  If you do not specify string3,
               VAXTPU names the journal file using its journal file naming
               algorithm.  EVE turns on buffer-change journaling by default
               for each new buffer.  However, the CREATE_BUFFER built-in
               does not automatically turn on journaling; if you are
               layering directly on VAXTPU, your application must use SET
               (JOURNALING) to turn journaling on.


 Comments

    If you want to skip an optional parameter and specify a subsequent
    optional parameter, you must use a comma as a placeholder for the
    skipped parameter.

 Examples

    1.  newb := CREATE_BUFFER ("new_buffer");

        Creates a buffer called NEW_BUFFER and stores a pointer to the
        buffer in the variable NEWB.

    2.  CREATE_BUFFER ("second_buffer", "login.com");

        Creates a second buffer and puts the file called LOGIN.COM into the
        buffer.

    3.  buf1 := CREATE_BUFFER ("Scratch",,,"Scratch_jl.jl");

        Creates a buffer named "Scratch" and directs VAXTPU to name the
        associated buffer-change journal file "Scratch_jl.jl".  Note that
        you must use commas as placeholders for the two unspecified
        optional parameters.  Note, too, that by default VAXTPU puts
        journal files in the directory defined by the logical name
        TPU$JOURNAL.  By default, TPU$JOURNAL points to the same directory
        that SYS$SCRATCH points to.  You can reassign TPU$JOURNAL to point
        to a different directory.

    4.  The following code fragment creates a template buffer called
        "Defaults", changes the end-of-buffer text for the template buffer,
        and then creates a user buffer.  The user buffer is created with
        the same end-of-buffer text that the defaults buffer has.


           defaults_buffer := CREATE_BUFFER ("Defaults");

           SET (EOB_TEXT, defaults_buffer, "[That's all, folks!]");

           user_buffer := CREATE_BUFFER ("User1.txt", "", defaults_buffer);


 Related topics

    CREATE_WINDOW    DELETE           GET_INFO(BUFFER_VARIABLE)
    READ_FILE        SET(JOURNALING)  SHOW
   1 CREATE_KEY_MAP
    CREATE_KEY_MAP

    Creates and names a key map; optionally returns the name of the key map
    created for use with other VAXTPU procedures.

    Syntax

       [string2] := CREATE_KEY_MAP (string1)

    Parameters

    string1    The name of the key map you are creating.

 Example

 The following procedure creates a key map and defines two keys in the key
 map; the name of the key map is stored in the variable MY_KEY_MAP which is
 used as a parameter for the DEFINE_KEY built-in:

 PROCEDURE init_my_key_map
    my_key_map := CREATE_KEY_MAP ("my_key_map");
    DEFINE_KEY ("EXIT", CTRL_Z_KEY, "Exit application", my_key_map);
    DEFINE_KEY ("COPY_TEXT ('syzygy')", F20, "Magic Word", my_key_map);
 ENDPROCEDURE;

 Related topics

    CREATE_KEY_MAP_LIST   DEFINE_KEY   REMOVE_KEY_MAP

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026