Evaluate command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
<span class="f_Para">Here is a macro definition that makes heavy use of the </span><span class="f_Monospace">evaluate</span><span class="f_Para"> command: </span>
<span class="f_Para">Here is a macro definition that makes heavy use of the </span><span class="f_Monospace">evaluate</span><span class="f_Para"> command: </span>


<p class="syntax"><span class="f_CodeExampleTable"># historyButtons.macro: Assign extrabutton&lt;extrBtn&gt;-&lt;extrBtn+3&gt; </span><br />
<p class="syntax"><span class="f_CodeExampleTable"># historyButtons.macro: Assign extrabutton&lt;extrBtn&gt;-&lt;extrBtn+3&gt; </span>
<span class="f_CodeExampleTable"># for history traversal </span><br />
<span class="f_CodeExampleTable"># for history traversal </span>
<span class="f_CodeExampleTable"># Usage: macro historyButtons &lt;extrBtn&gt; </span><br />
<span class="f_CodeExampleTable"># Usage: macro historyButtons &lt;extrBtn&gt; </span>
<span class="f_CodeExampleTable">extraButtonBar main </span><br />
<span class="f_CodeExampleTable">extraButtonBar main </span>
<span class="f_CodeExampleTable">set &amp;bnum </span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExampleTable"> &amp;argstring </span><br />
<span class="f_CodeExampleTable">set &amp;bnum </span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExampleTable"> &amp;argstring </span>
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' previousHistory' </span><br />
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' previousHistory' </span>
<span class="f_CodeExampleTable">increment &amp;bnum </span><br />
<span class="f_CodeExampleTable">increment &amp;bnum </span>
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' nextHistory' </span><br />
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' nextHistory' </span>
<span class="f_CodeExampleTable">increment &amp;bnum  </span><br />
<span class="f_CodeExampleTable">increment &amp;bnum  </span>
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' firstHistory' </span><br />
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' firstHistory' </span>
<span class="f_CodeExampleTable">increment &amp;bnum  </span><br />
<span class="f_CodeExampleTable">increment &amp;bnum  </span>
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' lastHistory'  </span><br />
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &amp;bnum ' lastHistory'  </span>
<span class="f_CodeExampleTable">evaluate 'echo buttons ' &amp;argstring '-' &amp;bnum ' set for history'</span></p>
<span class="f_CodeExampleTable">evaluate 'echo buttons ' &amp;argstring '-' &amp;bnum ' set for history'</span></p>
|-
|-

Revision as of 15:24, 29 November 2022

Action:

Constructs and runs a Client command. The evaluate argument values are concatenated into a single string and run as a Client command.

Syntax:

evaluate {&var|'string1'|"string2"|&&function} ... 

where:

  • &var is a previously defined macro variable.
  • string1 and string2 are single or double quoted string literals.
  • As of Build 69, an invocation of a Debugger Client &&function may also be used.

No blanks are placed between the argument values when they are concatenated, so you may have to add blanks with quoted string values.

Here is a macro definition that makes heavy use of the evaluate command:

# historyButtons.macro: Assign extrabutton<extrBtn>-<extrBtn+3>  # for history traversal  # Usage: macro historyButtons <extrBtn>  extraButtonBar main  set &bnum = &argstring  evaluate 'mapButton extrabutton' &bnum ' previousHistory'  increment &bnum  evaluate 'mapButton extrabutton' &bnum ' nextHistory'  increment &bnum   evaluate 'mapButton extrabutton' &bnum ' firstHistory'  increment &bnum   evaluate 'mapButton extrabutton' &bnum ' lastHistory'   evaluate 'echo buttons ' &argstring '-' &bnum ' set for history'

Client menu:
Introduced: Build 57