Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Examples

Parameters

Qualifiers

/ADDRESS

/COMMAND

/KEY

/LOCAL

/VALUE

key-names

/ECHO

/IF_STATE

/LOCK_STATE

/LOG

/NOECHO

/NOIF_STATE

/NOLOCK_STATE

/NOLOG

/NOSET_STATE

/NOTERMINATE

/SET_STATE

/TERMINATE

DEBUG DEFINE — VMS 5.1-B

     The DEFINE command is used to abbreviate names or  strings.   The
     command  comes in several forms, depending on whether you want to
     define an abbreviation for a program location, a value,  or  part
     of a debugger command.

 Format for /ADDRESS /COMMAND or /VALUE:

 DEFINE [/qualifier] symbol=expression [,symbol=expression ...]

 Format for /KEY:

 DEFINE/KEY[/qualifier...] key-name expression

Additional information available:

ExamplesParametersQualifiers

/ADDRESS/COMMAND/KEY/LOCAL/VALUE

Examples

     ! In the following example we define a short name "X" for a
     ! program location whose name is long. Note that DEFINE/ADDRESS
     ! is the default, so we do not need to specify it here.
     !
     DBG> DEFINE X = ROUTINENAME\SUBROUTINENAME\VARNAME
     DBG> EX X
     ROUTINENAME\SUBROUTINENAME\VARNAME: 17

     ! The following abbreviates a debugger command.
     !
     DBG> DEF/COM Z = "STEP/SILENT; EX ARR[I]"
     DBG> Z     ! This now does the above command

     ! The following redefines the keypad key KP0
     !
     DBG> DEF/KEY/TERM/NOECHO KP0 "STEP/SILENT; EX ARR[I]"


Parameters

 symbol

     Specifies the name of the symbol to be defined.  The  symbol  can
     be composed of alphanumeric (A-Z and 0-9) characters and must not
     start with a numeric.

     For DEFINE/KEY, key-name must be the name of a keypad key.

 expression

     For DEFINE/ADDRESS, any address expression.

     For DEFINE/COMMAND or DEFINE/KEY, any string enclosed  in  quotes
     (").  Quotes inside quotes must be doubled.

     For DEFINE/VALUE, any language expression in  the  currently  set
     language.

Qualifiers

     The define command allows the following qualifiers:

     /ADDRESS - Define an abbreviation for an address.
     /COMMAND - Define an abbreviation for a debugger command.
     /KEY     - Define a keypad key.
     /VALUE   - Define a name for a particular value.
     /LOCAL   - Defined symbol is local to the command procedure.

     See the subtopics for more details on  each  of  these.   Further
     qualifiers on DEFINE/KEY are documented in that subtopic.

/ADDRESS

     This specifies that the expression is to  be  interpreted  as  an
     address.   The  defined  symbol can then be used anywhere that an
     address expression  is  allowed,  for  example,  in  the  EXAMINE
     command,  in  the  SET WATCH command, and so on.  /ADDRESS is the
     default.

 Example:

     DBG> DEFINE X = PROGRAM\VARNAME[4].COMPNAME
     DBG> SET WATCH X
     DBG> EXAM X

/COMMAND

     This specifies that the expression is  to  be  interpreted  as  a
     string  containing  a  debugger  command.  The defined symbol can
     then be used as a debugger command, and it will be expanded  into
     the  given  string.  You can also define just the initial portion
     of a debugger command.

 Example:

     DBG> DEF/COM EB = "EXAM/BINARY/LONG "
     DBG> EB Y
     PROGRAM\Y: 11000111 00000000 10000001 01111110

/KEY

     DEFINE/KEY equates a string to a keypad key.  This command  gives
     the  same  capabilities  as  DEFINE/KEY  in DCL, and has the same
     syntax.

     You must have mode set  to  "KEYPAD".   Default  definitions  are
     provided  (see  "HELP  KEYPAD").   DEFINE/KEY lets you change the
     default definitions.

 Format:

     DEFINE/KEY [/qualifiers] key-name "key-definition"

 Examples

     DBG> DEFINE/KEY/NOECHO/TERMINATE KP0 "STEP"
     DBG> DEFINE/KEY/IF_STATE=GOLD KP1 "EXAMINE X"

Additional information available:

key-names

/ECHO/IF_STATE/LOCK_STATE/LOG/NOECHO/NOIF_STATE
/NOLOCK_STATE/NOLOG/NOSET_STATE/NOTERMINATE
/SET_STATE/TERMINATE

/ECHO

     (Default) Specifies that the keypad definition be echoed  on  the
     terminal when the key is used.

/IF_STATE=state-name

     Specifies that the key definition applies  only  to  that  state.
     So, for example, if the PF1 key sets you to "GOLD" state, and you
     do

      DEFINE/KEY/IF_STATE=GOLD KP0 "EXAMINE X"

     then the sequence "PF1", "KP0" will expand to "EXAMINE X".

key-names

        Key-name        LK201           VT100-type      VT52-type

        PF1             PF1             PF1             PF1
        PF2             PF2             PF2             PF2
        PF3             PF3             PF3             PF3
        PF4             PF4             PF4             PF4
        KP0,...,KP9     0,1,...,9       0,1,...,9       0,1,...,9
        PERIOD          .               .               .
        COMMA           ,               ,               ,
        MINUS           -               -               -
        ENTER           Enter           ENTER           ENTER
        UP              ^               ^               ^
        DOWN            V               V               V
        LEFT            <-              <-              <-
        RIGHT           ->              ->              ->
        E1              Find            N/A             N/A
        E2              Insert Here     N/A             N/A
        E3              Remove          N/A             N/A
        E4              Select          N/A             N/A
        E5              Prev Screen     N/A             N/A
        E6              Next Screen     N/A             N/A
        HELP            Help            N/A             N/A
        DO              Do              N/A             N/A
        F6,F7,...,F20   F6,F7,...,F20   N/A             N/A

/LOCK_STATE

     Specifies that the state set by the  SET_STATE  qualifier  is  to
     remain the active state until explicitly changed.

/LOG

     (Default)  Controls  whether  the  system  displays   a   message
     indicating that the key definition has been successfully created.

/NOECHO

     Specifies that  the  keypad  definition  not  be  echoed  on  the
     terminal when the key is used.

/NOIF_STATE

     (Default) Specifies that the key is to be defined for the current
     state only.

/NOLOCK_STATE

     (Default) Specifies that the state transition  specified  by  the
     current  key  will  only  take  effect  until the next terminator
     character is typed, or until the after the next function  key  is
     pressed.

/NOLOG

     Inhibits display of the message confirming the key definition.

/NOSET_STATE

     (Default) Do not change the current state when the  function  key
     being defined is entered.

/NOTERMINATE

     (Default) Specifies that the key expansion does not terminate the
     command.

/SET_STATE=state-name

     Specifies that using the key has the effect of putting  you  into
     the specified state when the key being defined is used.

/TERMINATE

     Specifies that the keypad key terminates the command.

/LOCAL

     Specifies that the symbol definition  is  local  to  the  command
     procedure  and will go away when the command procedure is exited.
     This qualifier is only valid for /ADDRESS, /COMMAND, and /VALUE.

/VALUE

     Specifies that the expression is to be interpreted as a value  in
     the  current  language.   The  defined  symbol  can  then be used
     anywhere a value expression is allowed, such as  in  an  EVALUATE
     command.

 Example:

     ! The following defines an abbreviation for a double-floating
     number.
     !
     DBG> DEF/VAL F = 1.103763783D27
     DBG> EVAL F + 1.0D27
     2.103763783D27

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