Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU MESSAGE — VMS 5.2

 MESSAGE

 Depending on which syntax format you choose, MESSAGE performs one of the
 following tasks:

 o  Puts the characters you specify into the message buffer if there is
    one.  By default, VAXTPU looks for a buffer named MESSAGE_BUFFER.
    Otherwise, the message is displayed at the current location on the
    device defined by SYS$OUTPUT (usually your terminal).

 o  Fetches text associated with a message code and formats the text using
    FAO directives.

 Syntax

    MESSAGE ({string | range} [, integer1])

 OR

    MESSAGE ({keyword | integer2} [, integer3 [, FAO parameters]])

 Parameters

    string          A string to be displayed in the message area.

    range           A range whose contents are to be displayed in the
                    message area.

    integer1        An integer indicating the severity of the message
                    placed in the message buffer.  The allowable values and
                    their meanings are as follows:

                       Integer   Meaning
                       -----------------
                           0     Warning
                           1     Success
                           2     Error
                           3     Informational

    keyword         The VAXTPU keyword representing the message code
                    associated with the text to be fetched.

    integer2        The integer representing the message code associated
                    with the text to be fetched.

    integer3        A bit-encoded integer controlling which portions of the
                    message are fetched.  If the message flags are not
                    specified, or if the value of a message flag is set to
                    zero, then the value specified by the SET
                    (MESSAGE_FLAGS...) built-in is used.  The meanings of
                    the message flags are as follows:

                    Bit VAXTPU Constant         Meaning
                    -----------------------------------------------------------
                    0   TPU$K_MESSAGE_TEXT      Include text of message
                    1   TPU$K_MESSAGE_ID        Include message identifier
                    2   TPU$K_MESSAGE_SEVERITY  Include severity level indicator
                    3   TPU$K_MESSAGE_FACILITY  Include facility name

    FAO parameters  Strings and integers to be substituted into the text
                    associated with the message code.  The message code is
                    specified by the first parameter.  FAO directives for
                    substituting strings and integers are provided within
                    the message text.  A maximum of 20 FAO parameters are
                    allowed.  For a description of the FAO directives, see
                    the VMS System Services Reference Manual.  For more
                    information on the FAO built-in in VAXTPU, see the
                    description of that built-in in the VAX Text Processing
                    Utility Manual.

 Comments

    The first syntax format puts the specified characters in the message
    buffer if one exists.  If the message buffer is not associated with a
    message window, messages are written to the buffer but do not appear on
    the screen.

    The second syntax format causes VAXTPU to fetch the text associated
    with a message code, format the text using FAO directives, and display
    the formatted message in the message buffer.  The difference between
    this operation and the operation performed by MESSAGE_TEXT is that
    MESSAGE_TEXT simply returns the resulting string, while MESSAGE places
    the string in the message buffer.

 Examples

    1.  MESSAGE ("Go Red Sox!");

        Writes the text "Go Red Sox!" in the message area.

    2.  The following procedure checks if the cursor is at the end of a
        line and writes the appropriate message:

        PROCEDURE user_test_eol
           MOVE_HORIZONTAL (+1);      ! move ahead one
           IF CURRENT_OFFSET = 0      ! at eol?
              THEN
                 user_at_eol := 1;    ! yes -- return true
                 MESSAGE ("Cursor is at the end of the line.");
               ELSE
                  user_at_eol := 0;   ! no -- return false
                  MESSAGE ("Cursor not the at end of a line.");
           ENDIF;
           MOVE_HORIZONTAL (-1);      ! move back one
        ENDPROCEDURE;

    3.  The following statement fetches the text associated with the
        message code TPU$_OPENIN and substitutes the string "FOO.BAR" into
        the message.  All of the text of the message is fetched.  The
        string "Error opening FOO.BAR as input" is displayed in the message
        buffer.

        MESSAGE (tpu$_openin, TPU$K_MESSAGE_TEXT, "FOO.BAR");

 Related Topics

    MESSAGE_TEXT   FAO

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