# The Locals Window

## Overview

The Locals Window displays all local variables in scope. It may be used to visualize and edit local variables.

Locals Window topics:

- Variable Menu
  - Edit
  - Format
- Locals Display
  - Dereferencing Pointers
  - Viewing a Structure or Class
  - Editing a Variable
  - Locals Pop-up Menu

### Variable Menu

The Variable Menu gives on-screen access to the funtions of the Locals Window. To use any of these functions, first use the left mouse button to select a variable from the display. Then select:

Edit
  Edit the value of the variable
Format
  Change the display format of the variable

### Locals Display The Locals Window Display consists of a scrolled listbox which contains all local variables, one per line. To use any of the functions of the Locals Window, use the left mouse button to select any element from the Display.

Pointers, structures, and classes appear in the display with small exapansion box before their names. To dereference pointers or view the members of classes or structures, click the closed expansion box (which appears as a small plus sign, "+") to "expand" the listing. The expansion box changes to a minus sign, "-", indicating that the display is now open. Pointers, structures and classes may be expanded recursively to allow multiple pointer dereferences and embedded structure viewing.

The Locals Display updates after every execution of the program and highlights in blue those variables whose values have changed.

The Locals Window will, by default, display all pointers in hexadecimal and all other variables in decimal. To change the display format for a variable, select the Format option from either the Variable Menu or the Locals Pop-up Menu.

#### Editing a Variable

To edit a variable, either double-click the left mouse button on the variable in the Display or select the Edit option from either the Variable Menu or the Locals Pop-up Menu. To abort editing a variable's value, simply press the escape key on the keybaord. The variable's original value is restored.

#### Locals Pop-up Menu

The Locals Pop-up Menu provides quick access to the functions of the Locals Window. To use the Locals Pop-up Menu, first select a variable from the Display (by clicking the left mouse button on it) and click the right mouse button, choosing from the pop-up:

Edit
  Edit the variable's value. See Editing a Variable
Format
  Change the display format of the variable. The variable may be displayed as:
  Hex
    hexadecimal (base 16)
  Decimal
    decimal (base 10)
  Binary
    binary (base 2)
  Octal
    octal (base 8)