The "Variables" window allows you to view and modify the values of the device’s [[Special Function Registers of RadiaCode|Special Function Registers]](SFR).
When first opened, the "Variables" window contains a single tab labeled "Main." You can add additional tabs (using the "Add New Page" command from the local menu) and rename any existing tab. Each tab operates independently and is equivalent to a separate "Variables" window. Moreover, multiple "Variables" windows can be opened.
When adding a new register ("variable") to this window, RadiaCode places it in the active tab of the active "Variables" window.
You can use the "Ins" key or the shortcut "Ctrl+A" to add a variable to the "Variables" window.
The selected object is highlighted in color. To select another object, click it or use the cursor keys.
----
**Display Modes**
The window includes both vertical and horizontal grids, which can be toggled on or off individually.
When the vertical grid is enabled, the data in the window is arranged in columns, and each column has a header in the form of a button. Clicking the buttons "Name," "Type," and "Address" opens the "Display Options" dialog for the selected variable in the window. Clicking the "Value" button opens the "Edit Value" dialog for the selected variable.
When the vertical grid is disabled, double-clicking on a row with an object opens the "Edit Value" dialog for that variable.
To toggle the vertical or horizontal grid, use the corresponding checkbox on the "Fonts" tab (menu "Configuration," command "Screen Options").
----
**Local Menu**
The local window menu contains the following commands, and each command has a corresponding toolbar button:
![[EN/Windows APP/ImagesPC/localmenuwatches.png|400]]
| Command | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add Variable/Expression | Adds one or more objects to the window. Opens the "Add Variable to Window" dialog to select an object by name. |
| Remove Variable from Window | Removes the selected object from the window. |
| Remove All Variables from Window| Removes all objects from the window. |
| Edit Value | Opens the "Edit Value" dialog to set a new value for the selected variable. This can also be done by simply typing a new value on the keyboard. |
| Move Name Up | Moves the selected object one row up in the list. |
| Move Name Down | Moves the selected object one row down in the list. |
| Display Options | Opens the "Display Options" dialog to modify the display settings of the selected object and to add or remove tabs in the window. |
| Add New Page | Works similarly to the "Add Page" button in the "Display Options" dialog. |
| Window Help | Opens this contextual help. |
| Properties | Manages the window's properties, such as font, colors, etc. |
---
## Display Options Dialog
This dialog controls the display settings of the selected variable or expression in the window.
**Variables**, and also adds or removes tabs in this window.
| Dialog Element | Description |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Variable Name | Contains the name of the selected variable. |
| Display Format | Specifies the display format for the selected variable: binary, hexadecimal, decimal, or ASCII. |
| Pop-up Description | Enables pop-up descriptions for special-purpose registers. |
| Display Bit Scheme | Enables pop-up descriptions for the bit scheme of special-purpose registers, if available. |
| Display Bit Descriptions | Enables pop-up descriptions for the bits of special-purpose registers, if available. |
| Automatic Field Size for Name | When this option is enabled, and the vertical grid is enabled (see the note below), the window automatically adjusts the width of the "Name" column to fit the longest entry. |
| Pages | A list of bookmarks (tabs) in the window. |
| Add Page | Opens the "Add New Page" dialog in the Variables window to input the name of the new bookmark. The window will create a new tab when OK is pressed. |
| Delete Page | Deletes the bookmark selected in the "Tabs" list. |
| Edit Page | Opens the "Set Page Name" dialog to edit the name of the bookmark. |
>[!note]
> To enable the vertical grid, use the **Configuration** menu, the **Screen Options** dialog, the **Font** tab, and the **Grid** checkbox.