ContinueMacroIf command

From m204wiki
Revision as of 01:47, 25 May 2022 by Ekern (talk | contribs) (Created page with "__TOC__ {| |width="50%"| '''Action:''' |width="50%"| <span class="f_Para">Determines whether the processing of the Debugger macro that contains...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Action:

Determines whether the processing of the Debugger macro that contains this command 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 command argument is False, the macro terminates (without error). This behavior contrasts with that of the continueIf command, which exits not only the macro containing the continueIf command but also any macro(s) within which that macro is contained.

Syntax:

continueMacroIf 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 continueMacroIf 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:

# See if it is watched, done if not 
in watchWindow searchFromTop &argstring 
continueMacroIf &&searchSuccess 
#
# It was watched, remove and tell what we did
removeCurrentWatch
echo &&concatenate("removed watch ", &argstring) 
...
continueMacroIf &testMe = 1
...
continueMacroIf &&blackOrWhiteList <> 'black' 

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