Arbortext Command Language > Using the Arbortext Command Language > Setting Values for Variables
  
Setting Values for Variables
An assignment statement of the format $varname=expression (where expression represents the new value for the variable) can be used to create a new variable and assign a value to it. You can also use this form of assignment statement to change the value of an existing variable. The expression must be terminated by the end of the command line or a semicolon (;). The assignment statement can be typed at the Arbortext Editor command line or entered in a command file (such as your docname.acl file). The new value will be recognized for the current editing session.
To change the value of an existing variable, you can:
use an assignment statement to give the variable a new value
reassign the value of the variable using an assignment operator (a subclass of expression operators)
use the increment (++) or decrement (– –) operator
For example, you might use one of the following assignment statements to change the value of a variable:
$i++
$n += 5
The command unsetvar and the delete function allow you to “undo” the definition of a variable.
Note that the variables $currentline, $dirselect, $selection, $tagname, and $topline are read-only, and their values may not be changed.
Related Topics
Creating your own variables
Predefined variables
Using variables
The execute command