Diving on Complex Variables
The subelements of complex structures can be analyzed by diving on them. Diving on a subelement of a compound structure replaces the top level structure with the subelement, on which you can further dive (if, for instance, you have an array of structures), so that you can edit and manipulate it as needed.
Right-click on a subelement in the Data View and select
Dive, or click the
Dive arrow (
).
The new expression
replaces the selected expression.
Dive in New Data View
You may wish to retain the parent variable in the Data View rather than replacing it in the view. Choosing
Dive in New Data View from the context menu instead of Dive creates a
new Data View containing the selected element. The new window is numbered, starting with “<1>.” If you undock or redock one of the Data View windows, you can view both the parent element and the subelement on which you dived side-by-side.
You can also duplicate a variable, which makes a copy and places it at the bottom of the existing Data View. See
Duplicating an Expression.
Redive and Undive
When diving on compound structures, use the
Redive and
Undive arrows (
) to move up and down the dive stack.
After diving on an element in a compound variable, the
Undive arrow (
) becomes active, and
Undive is available in the context menu. Choosing Undive moves one level back up the dive stack.
After choosing Undive, the
Redive arrow (
) becomes active. Rediving repeats the previous dive.
When diving on arrays or other variables with multiple, nested structures, you can use Dive In All to display a single field of a structure in an array of structures as a
new array across all the structures. See
The Dive In All Command.