# Variables

There are three types of variables in Yate:

- Track Variabless
- Named Variables
- System Variables

Track Variables, aka Per Track Variables or Variable Fields, are essentially variables unique to each track which you can use within actions like any other field. These track variables exist only while an action is running. There are sixteen track variables named: Variable 0, Variable 1, ..., Variable 15. The track variables can also be accessed via Escape Sequences from text fields in actions. Basically to access a track variable in a text field you use \v0 through \v15.

Named Variables are not unique to each file but exist across all files. The name of a Named Variable may contain any sequence of characters. It is not a good idea to use > characters in the name as access will become difficult. Named variables are case insensitive. Named variables are set via the Set Named Variable action function and are read via Escape Sequences from text fields in actions. To specify a named variable in a text field the format is: \<name>. Named variables are useful as they give you the ability to store data without using up the more limited ten per file Variables and in the fact that they are unique across all files. Named variables tend to be more efficient than per file variables when you want a unique value across all open files. Named variables are erased when action processing terminates. This is either when an action run from the UI finishes or when a batch process finishes. Named variables can be manually removed by setting them to an empty value. When using named variables it is a good practice to initialize them before their first use, rather than assuming that they will be empty. However, all accesses to uninitialized named variables will return an empty value. The Insert Named Variable context menu provides an easy means of quickly accessing all used named variables across all open actions.

System Variables persist until cleared, even when Yate is closed. They are not unique to each file but exist across all files. System Variables may be examined and modified in Preferences - System Variables. System Variables may be cleared via the Clear All System Variables function. They are assigned via the Set System Variable function. They are read via Escape Sequences from text fields in actions. You access a system variable in a text field via \s0 through \s9.

## Action Runtime Settings

Action Runtime Settings are similar to Named Variables. However, they are not intended to be used as general purpose variables but rather a means of keeping state for an action after it terminates. The writing of an Action Runtime Setting is far less efficient than storing a Named Variable and named variables are far more accessible from action statements. Action Runtime Settings persist until they are removed. More information can be found in Action Runtime Settings.

Data Types

Lists

Containers