ContinueIf command

From m204wiki
Revision as of 00:57, 26 January 2023 by Ekern (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Action:

Determines whether the processing of a Debugger macro may continue. If the state ("True" or "False") of a specified command argument (macro variable, client function, or constant) is True, the macro continues.

If the state of the continueIf argument or comparison expression is False, the macro containing this command and any macro(s) within which this macro is contained terminate (without error). This behavior contrasts with that of the continueMacroIf command, which exits only the macro containing the continueMacroIf command.

Syntax:

continueIf test

Where test is:

&var | &&function | const  [ = | <> &var | &&function | const 

Where:

  • &var is a macro variable that may or may not already exist.
  • &&function is a Client function.
  • const is a constant.

Notes:

If continueIf is used with a single argument and that argument is 0 or a zero length (null) string, or if it is undefined, its state is considered to be False. For all other values, its state is considered to be True. In an equality comparison any undefined item makes an equality comparison False.

Example:

# Execute Step and optionally update history
noSpan
step
continueIf &historyWanted
getHistory 
...
continueIf &testMe <> &testMe2 

Scope: Allowed only in Debugger macros
Client menu: --
Introduced: Build 37