## Viewing Expressions

The Expressions view allows manipulation of expressions. An expression is a snippet of code that is evaluated to produce a value. In Carbide they are defined using C/C++ expressions. Some expressions may need to be evaluated at a specific location in the program so that its variables can be referenced.

The Expressions view displays these panes:

- Expressions list pane—Lists expressions and expression hierarchies. Click the hierarchical controls to expand or collapse the expression. Right-click to open the Expressions view context menu.
- Value pane—Shows the current value of each corresponding expression. Double-click a value to change it. Right-click to set viewing options.

Figure 1 - Expressions view

### Expressions view toolbar icons

The following commands appear on the Expressions view toolbar:

Item | Icons | Explanation
--- | --- | ---
Show Type Names |  | Toggles the display of type names in the Expressions view.
Show Logical Structure |  | Not available in C/C++ yet.
Collapse All |  | Collapses all expanded expressions into the top level.
Remove Selected Expression |  | Click to remove all currently selected expressions from the expressions list.
Remove All Expressions |  | Click to remove all expressions from the expressions list.

### Expressions view context menu options

Right-click in the Expression's pane in the Expressions view to access the context menu commands shown in Figure 2.

Figure 2. Expressions view context menu commands (Expression list pane)

The commands include:

Item | Explanation
--- | ---
Select All | Selects all the expressions shown in the Expressions view.
Copy Expressions | Copies the selected expressions to the clipboard.
Remove | Remove the selected expressions from the Expressions view list.
Remove All | Remove all expressions from the Expressions view list.
Find... | Opens a Find dialog to search the Expressions view list.
Change Value... | Opens the Set Value dialog where you can modify the value assigned to the selected expressions. Change the value and click OK.
Add Watch Expression... | Opens the Add Watch Exression dialog for creation of a new expression.
Disable | Disables automatic evaluation of the selected expression and appends (disabled) to the expression name. Useful when you have lots of expressions but are concentrating on only a few. The more expressions that need evaluaton, the longer it takes to update the Expressions view.
Enable | Enables automatic evaluation of the selected expression. Enables a disabled expression so that it is evaluated during the debug session.
Edit Watch Expression... | Opens the Edit Watch Expression dialog where you can modify the expression and enable it for automatic evaluation.
Reevaluate Watch Expression | Forces the expression to be reevaluated. Useful after the expressions has been edited or not evaluated due to being disabled.

##### Other references

- Variables and Expressions Overview