ContinueMacroIf command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ {| |width="50%"| '''Action:''' |width="50%"| <span class="f_Para">Determines whether the processing of the Debugger macro that contains...")
 
No edit summary
Line 6: Line 6:
<span class="f_Para">Determines whether the processing of the Debugger [[using_debugger_macros.html|macro]] that contains this command may continue. If the state (&quot;True&quot; or &quot;False&quot;) of a specified command argument ([[working_with_macro_variables.html|macro variable]], [[working_with_macro_functions.html|client function]], or constant) is </span><span class="f_Monospace">True,</span><span class="f_Para"> the macro continues. </span>
<span class="f_Para">Determines whether the processing of the Debugger [[using_debugger_macros.html|macro]] that contains this command may continue. If the state (&quot;True&quot; or &quot;False&quot;) of a specified command argument ([[working_with_macro_variables.html|macro variable]], [[working_with_macro_functions.html|client function]], or constant) is </span><span class="f_Monospace">True,</span><span class="f_Para"> the macro continues. </span>


<span class="f_Para">If the state of the command argument is </span><span class="f_Monospace">False,</span><span class="f_Para"> the macro terminates (without error). This behavior contrasts with that of the </span><span class="f_Monospace">[[continueif_cmd.html|continueIf]]</span><span class="f_Para"> command, which exits not only the macro containing the </span><span class="f_Monospace">continueIf</span><span class="f_Para"> command but also any macro(s) within which that macro is contained. </span>
<span class="f_Para">If the state of the command argument is </span><span class="f_Monospace">False,</span><span class="f_Para"> the macro terminates (without error). This behavior contrasts with that of the </span><span class="f_Monospace">[[continueIf command|continueIf]]</span><span class="f_Para"> command, which exits not only the macro containing the </span><span class="f_Monospace">continueIf</span><span class="f_Para"> command but also any macro(s) within which that macro is contained. </span>


'''Syntax:'''  
'''Syntax:'''  

Revision as of 18:13, 6 September 2022

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