Introduction MTB Statements File System Compiler Applications Reference Guide Index

Linking Methods

The help messages are linked to their corresponding object programs by one of the following three methods:

  1. object program name + cursor position (i.e., screen coordinates) + "@0000@"

    This is the simplest way to link a help message to an object program. The Comet Help System combines the object program name and the current cursor position, and uses the resulting field as the key to store and retrieve the help message. However, if your program has multiple display formats that use the same screen location, the help system provides access to only one help message (see method 2 for an alternative).

  2. object program name + cursor position + program address

    This method adds the program execution address to the object program name and cursor position. The resulting field is used as the key to store and retrieve the help message. This combination solves the multiple format problem from above. However, if you modify and recompile your program, the execution addresses will change, and your help links will no longer be valid.

  3. object program name + value of the HELPKEY$ system variable

    The ultimate way to control the links between your program and the Comet Help System is to use the system variable called .

    HELPKEY$ is a 4-byte string whose value is set by your MTB program and subsequently used by the help system as the key to store and retrieve the help message.

    For example, if your program sets HELPKEY$ to a value of "ABCD", the help message will be keyed by the object program name plus "ABCD" (see example below).

    You may change the value of HELPKEY$ throughout a single MTB program; each new value will effect a new help message link. This is the way to link numerous help messages to a single object program without using the screen position/program address method.

    If the HELPKEY$ variable is not set by your MTB program, the system assigns it a null value, and the Comet Help System (if invoked) will link help messages using one of the first two methods from above.

    Thus, with HELPKEY$, your access to help messages does not depend on the screen position or the program execution address.

Example:

This sample MTB program segment shows how the value of HELPKEY$ can be changed throughout a single program. This object program is named TEST.

  !S XTEST,DSK
  !O TEST,DSK
  !L T00,E
  !R CED
  .
  .
  HELPKEY$="ABCD"        ! At this point, the help message
  INPUT (0) VAR1$        ! will be keyed by 
  .                      ! "TEST.MTB" + "ABCD"
  .
  .
  HELPKEY$="1234"        ! At this point, the help message
  INPUT (0) VAR2$        ! will be keyed by 
  .                      ! "TEST.MTB" + "1234"
  .
  .
  HELPKEY$="ZZZZ"        ! At this point, the help message
  INPUT (0) VAR3$        ! will be keyed by 
  .                      ! "TEST.MTB" + "ZZZZ"
  .
  .
!

Please see also:


Working with the #NOVA Control File