The syntax for displaying data is identical to C and C++ language cast syntax for all data types except pointers to arrays. That is, you use C and C++ cast syntax for data types. For example, you can cast using types such as
int,
char,
unsigned,
float,
double,
union, all named
struct types, and so on. In addition, TotalView has a built-in type called
$string. Unless you tell it otherwise, TotalView maps
char arrays to this type. (For information on wide characters, see
“Viewing Wide Character Arrays ($wchar Data Types)”.)
Read TotalView types from right to left. For example, $string*[20]* is a pointer to an array of 20 pointers to
$string.
The two Variable Windows cast the same data in the same way. In the top-left window, a cast was used in the
Expression field. In the other Variable Window, the data type was changed from
int to
$char. In the first cast, TotalView changed the
Type for you. In the second, it did not alter the
Expression field.
The Expression List Window contains two casting examples. The first casts a function’s returned value to
long long. The second is the same cast as was made in the two Variable Windows.
TotalView also lets you cast a variable into an array. In the GUI, add an array specifier to the
Type declaration. For example, adding
[3] to a variable declared as an
int changes it into an array of three
ints.