Evaluate command: Difference between revisions
(Created page with "__TOC__ {| |width="50%"| '''Action:''' |width="50%"| <span class="f_Para">Constructs and runs a Client command. The </span><span class="f_Monospace">evaluate</span><span clas...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{| | {| | ||
|width=" | |width="125px"| '''Action:''' | ||
|width=" | |width="775px"| | ||
<span class="f_Para">Constructs and runs a Client command. The </span><span class="f_Monospace">evaluate</span><span class="f_Para"> argument values are concatenated into a single string and run as a Client command. </span> | <span class="f_Para">Constructs and runs a Client command. The </span><span class="f_Monospace">evaluate</span><span class="f_Para"> argument values are concatenated into a single string and run as a Client command. </span> | ||
Line 12: | Line 12: | ||
<span class="f_Para">where: </span> | <span class="f_Para">where: </span> | ||
*<span class=" | *<span class="term">&var</span><span class="f_ListBul1"> is a </span><span class="f_Para">previously defined </span><span class="f_ListBul1">[[Working with macro variables|macro variable]]. </span> | ||
* <span class=" | * <span class="term">string1</span><span class="f_ListBul1"> and </span><span class="term">string2 </span><span class="f_ListBul1">are</span><span class="f_Para"> single or double quoted string literals. </span> | ||
* <span class="f_Para">As of Build 69, an invocation of a Debugger Client [[ | * <span class="f_Para">As of Build 69, an invocation of a Debugger Client [[Working with Client functions (Debugger)|&&function]] may also be used.</span> | ||
<span class="f_Para">No blanks are placed between the argument values when they are concatenated, so you may have to add blanks with quoted string values. </span> | <span class="f_Para">No blanks are placed between the argument values when they are concatenated, so you may have to add blanks with quoted string values. </span> | ||
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<extrBtn>-<extrBtn+3> </span | <p class="syntax"><span class="f_CodeExampleTable"># historyButtons.macro: Assign extrabutton<extrBtn>-<extrBtn+3> </span> | ||
<span class="f_CodeExampleTable"># for history traversal </span | <span class="f_CodeExampleTable"># for history traversal </span> | ||
<span class="f_CodeExampleTable"># Usage: macro historyButtons <extrBtn> </span | <span class="f_CodeExampleTable"># Usage: macro historyButtons <extrBtn> </span> | ||
<span class="f_CodeExampleTable">extraButtonBar main </span | <span class="f_CodeExampleTable">extraButtonBar main </span> | ||
<span class="f_CodeExampleTable">set &bnum </span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExampleTable"> &argstring </span | <span class="f_CodeExampleTable">set &bnum </span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExampleTable"> &argstring </span> | ||
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' previousHistory' </span | <span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' previousHistory' </span> | ||
<span class="f_CodeExampleTable">increment &bnum </span | <span class="f_CodeExampleTable">increment &bnum </span> | ||
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' nextHistory' </span | <span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' nextHistory' </span> | ||
<span class="f_CodeExampleTable">increment &bnum </span | <span class="f_CodeExampleTable">increment &bnum </span> | ||
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' firstHistory' </span | <span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' firstHistory' </span> | ||
<span class="f_CodeExampleTable">increment &bnum </span | <span class="f_CodeExampleTable">increment &bnum </span> | ||
<span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' lastHistory' </span | <span class="f_CodeExampleTable">evaluate 'mapButton extrabutton' &bnum ' lastHistory' </span> | ||
<span class="f_CodeExampleTable">evaluate 'echo buttons ' &argstring '-' &bnum ' set for history'</span></p> | <span class="f_CodeExampleTable">evaluate 'echo buttons ' &argstring '-' &bnum ' set for history'</span></p> | ||
|- | |- |
Latest revision as of 21:20, 30 January 2023
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:
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 |