&&arg: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
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 [[passing_arguments_to_macros.html#arg1_arg2|dynamically provided]] by the Client user.  
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:'''

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