Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU EXECUTE — VMS 5.2

 EXECUTE

    Does one of the following:

    o  Executes a program that you have previously compiled

    o  Compiles and then executes any executable statements in a specified
       buffer, range, or string

    o  Replays or executes a learn sequence

    o  Executes the program, procedure, or learn sequence bound to a key.

 Syntax

    EXECUTE ({program | buffer | range | string1
             | learn | keyword [,string2]})

 Parameters

    program              The program you want to execute.

    buffer               The buffer whose contents you want to execute.
                         The buffer must contain only valid VAXTPU
                         statements.

    range                The range whose contents you want execute.  The
                         range must contain only valid VAXTPU statements.

    string1              The string whose contents you want to execute.
                         The string must contain only valid VAXTPU
                         statements.  The string cannot be longer than 132
                         characters.

    learn                The learn sequence you want to replay.

    keyword              The key (or key combination) whose definition you
                         want to execute.  See help on KEYNAMES TABLE.

    string2              Optionally, a key map or key-map list in which a
                         key is defined.  If you specify a keyname as the
                         required parameter for EXECUTE, you may optionally
                         specify the key map or key map list from which
                         VAXTPU should get the key definition.  If this
                         parameter is not specified, VAXTPU uses the first
                         definition found in the key map list bound to the
                         current buffer.

 Comments

    To specify a value to be returned by the EXECUTE statement, use a
    RETURN statement as the last statement in the code, string, or learn
    sequence passed to EXECUTE.  by passing a string parameter.  For
    example, the following statement assigns to the variable "a" the value
    of the program returned by the LOOKUP_KEY built-in:

    a := EXECUTE ("RETURN LOOKUP_KEY (ENTER, PROGRAM)");

    If you specify the name of an undefined, self-inserting key as the
    first parameter, VAXTPU inserts the appropriate character into the
    current buffer.

 Examples

    1.  EXECUTE (main_buffer);

        Compiles the contents of the main buffer, and then executes any
        executable statements.  If there is text in the main buffer other
        than VAXTPU statements, you get an error message.  If there are
        procedure definitions in the main buffer, they are compiled, but
        they are not executed until you run the procedure.  Once compiled
        by the EXECUTE built-in, procedures in the main buffer can be
        called by other VAXTPU statements, programs, or procedures.

    2.  EXECUTE (RET_KEY, "TPU$KEY_MAP_LIST");

        The following statement looks up the program bound to the RETURN
        key in the default VAXTPU key map list and executes the code or
        learn sequence found.

    3.  The following procedure prompts the user for a VAXTPU statement to
        execute, and then executes the statement:

        PROCEDURE user_do
           command_string := READ_LINE ("VAXTPU statement to execute:  ")
           EXECUTE (command_string);
        ENDPROCEDURE

 Related Topics

    COMPILE    RETURN

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