Arbortext Command Language > Using the Arbortext Command Language > Symbolic Parameters
  
Symbolic Parameters
A symbolic parameter is a variable, such as $1 or $2, whose value is defined by the context within which it is used. Symbolic parameters can be used to define arguments for aliases. For example, a generic alias can be used to replace a specific string in a document by a different string. If the alias is used more than once for different replacement strings, the following alias using symbolic parameters would be a solution.
alias replace_string {
find $1
delete_mark
insert_string $2
}
When the command replace_string "Peter" "John" is run, the alias uses the first argument ("Peter") in the find command and the second argument ("John") in the insert_string command. The result would be that the first occurrence of the string Peter after the cursor (in the document) would be replaced by the string John.
Arbortext Editor allows you to supply parameters to the alias command. This means that you can define an alias, leaving a slot for information you will supply when you type the new command. This “slot” is indicated by the notation $1, $2, $3, and so on, where $1 is the location where the first piece of information encountered is to be supplied, $2 is the location for the second piece of information, and so forth.
For example, if you have a tendency to type open at the command line as the command to open a different document, you can define the alias:
alias open edit $1
To move to the document ProposalA, you can type either edit ProposalA or open ProposalA at the command line.