Print Function

Action

Prints a message to the run-time details part of the Monitor window.

Include file

Kernel.bdh

Syntax

Print( in sMsg         : string,
       in nDisplayType : number optional,
       in nColor       : number optional);
Parameter Description
sMsg Message to be printed.
nDisplayType

Specifies at which Monitor window settings the message is displayed (optional). This parameter can be any combination of the following:

  • OPT_DISPLAY_ERRORS

  • OPT_DISPLAY_TRANSACTIONS

  • OPT_DISPLAY_TIMERS

  • OPT_DISPLAY_FUNCTIONS

  • OPT_DISPLAY_INFO

  • OPT_DISPLAY_DATA

  • OPT_DISPLAY_ALL. Displays the message independent of the Monitor window settings (default).

nColor

Color used to print the message (optional). Defined colors are:

  • TEXT_BLUE

  • TEXT_RED

  • TEXT_BLACK

  • TEXT_MAGENTA (default)

  • TEXT_GREEN

  • TEXT_GRAY

Example

dcltrans
  transaction TPrint
  begin
    ...
    // display the message in red
    Print("Error executing SQL command", OPT_DISPLAY_ALL, TEXT_RED);
  end TPrint;

Output

Error executing SQL command

Sample scripts

Trans.bdf, MutexLogin.bdf