DBG$HELP.HLB  —  DEBUG  IF
    Executes a sequence of commands if a language expression (Boolean
    expression) is evaluated as true.

    Format

      IF  Boolean-expression THEN (command[; . . . ])

          [ELSE (command[; . . . ])]

1  –  Parameters

 Boolean-expression

    Specifies a language expression that evaluates as a Boolean value
    (true or false) in the currently set language.

 command

    Specifies a debugger command. If you specify more than one
    command, you must separate the commands with semicolons (;).

2  –  Description

    The IF command evaluates a Boolean expression. If the value is
    true (as defined in the current language), the command list in
    the THEN clause is executed. If the expression is false, the
    command list in the ELSE clause (if any) is executed.

    Related commands:

       EXITLOOP
       FOR
       REPEAT
       WHILE

3  –  Example

  DBG> SET BREAK R DO (IF X .LT. 5 THEN (GO) ELSE (EXAMINE X))

      This command causes the debugger to suspend program execution
      at location R (a breakpoint) and then resume program execution
      if the value of X is less than 5 (Fortran example). If the
      value of X is 5 or more, its value is displayed.
Close Help