&&arg: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
|width="50%"| '''Action:''' | |width="50%"| '''Action:''' | ||
|width="50%"| | |width="50%"| | ||
Serves as a placeholder for a command argument ''within a macro'' (if used outside of a macro, an error is issued). The argument that takes the place of &&arg is [[ | Serves as a placeholder for a command argument ''within a macro'' (if used outside of a macro, an error is issued). The argument that takes the place of &&arg is [[Passing a command argument to a macro#Multiple argument example|dynamically provided]] by the Client user. | ||
'''Syntax:''' | '''Syntax:''' | ||
Line 10: | Line 10: | ||
<p class="syntax">&&arg(''n'') </p> | <p class="syntax">&&arg(''n'') </p> | ||
where ''n'' is a numeric constant, or a [[ | where ''n'' is a numeric constant, or a [[Working with macro variables|macro variable]]. </span> | ||
<span class="f_Para">Designed for commands that have multiple arguments, this function parses the blank-delimited, user-provided string to determine the replacement values for the </span><span class="f_Monospace">&&arg</span><span class="f_Para"> occurrences within the command. The first such value in the string replaces </span><span class="f_Monospace">&&arg(1)</span><span class="f_Para">, the second replaces </span><span class="f_Monospace">&&arg(2)</span><span class="f_Para">, and so on. </span> | <span class="f_Para">Designed for commands that have multiple arguments, this function parses the blank-delimited, user-provided string to determine the replacement values for the </span><span class="f_Monospace">&&arg</span><span class="f_Para"> occurrences within the command. The first such value in the string replaces </span><span class="f_Monospace">&&arg(1)</span><span class="f_Para">, the second replaces </span><span class="f_Monospace">&&arg(2)</span><span class="f_Para">, and so on. </span> | ||
<span class="f_Para">The </span><span class="f_Monospace">[[ | <span class="f_Para">The </span><span class="f_Monospace">[[Passing a command argument to a macro#Using the &argstring variable|&argstring]]</span><span class="f_Para"> variable is a placeholder designed for single-argument commands within a macro. </span> | ||
<span class="f_Para">If a command takes a single argument, or you want to treat whatever is passed to the command as a single string (even if it contains blanks), use the </span><span class="f_Monospace">[[ | <span class="f_Para">If a command takes a single argument, or you want to treat whatever is passed to the command as a single string (even if it contains blanks), use the </span><span class="f_Monospace">[[Passing a command argument to a macro#Using the &argstring variable|&argstring]]</span><span class="f_Para"> variable instead of the </span><span class="f_Monospace">&&arg</span><span class="f_Para"> function. </span> | ||
|- | |- | ||
| '''Scope:''' | | '''Scope:''' |
Latest revision as of 17:54, 9 March 2023
Action: |
Serves as a placeholder for a command argument within a macro (if used outside of a macro, an error is issued). The argument that takes the place of &&arg is dynamically provided by the Client user. Syntax: &&arg(n) where n is a numeric constant, or a macro variable. Designed for commands that have multiple arguments, this function parses the blank-delimited, user-provided string to determine the replacement values for the &&arg occurrences within the command. The first such value in the string replaces &&arg(1), the second replaces &&arg(2), and so on. The &argstring variable is a placeholder designed for single-argument commands within a macro. If a command takes a single argument, or you want to treat whatever is passed to the command as a single string (even if it contains blanks), use the &argstring variable instead of the &&arg function. |
Scope: | Allowed only in Debugger macros. |
Introduced: | Build 28 |