Changing the Data Type of Variables
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.
You can change the way TotalView displays data in the Variable Window by editing its 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 displaying a C variable, TotalView data types are identical to C type representations, except for pointers to arrays. TotalView uses a simpler syntax for pointers to arrays.
- When displaying a Fortran variable, TotalView types are identical to 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 types of the fields listed in the window.
Note: When you edit a type, TotalView changes how it displays the variable in the current Variable Window, but other windows listing the variable remain the same.