Changing a Variable’s Data Type
The data type declared for the variable determines its format and size (amount of memory). For example, if you declare an int variable, TotalView displays the variable as an integer.
The following sections discuss the different aspects of data types:
You can change the way TotalView displays data in the Variable Window and the Expression List Window by editing the data type. This is known as casting. TotalView assigns types to all data types, and in most cases, they are identical to their programming language counterparts.
When a C or C++ variable is displayed in TotalView, the data types are identical to their C or C++ type representations, except for pointers to arrays. TotalView uses a simpler syntax for pointers to arrays. (See
“Viewing Pointers to Arrays”.) Similarly, when Fortran is displayed in TotalView, the types are identical to their Fortran type representations for most data types, including
INTEGER,
REAL,
DOUBLE PRECISION,
COMPLEX,
LOGICAL, and
CHARACTER.
If the window contains a structure with a list of fields, you can edit the data types of the listed fields.
When you edit a data type, TotalView changes how it displays the variable in the current window. Other windows listing the variable do not change.