Totalview® for HPC User Guide : PART II Debugging Tools and Tasks : Chapter 9 Examining and Editing Data and Program Elements : Changing a Variable’s Data Type : Casting Using the Built-In Types
Casting Using the Built-In Types
TotalView provides a number of predefined types. These types are preceded by a $. You can use these built-in types anywhere you can use the ones defined in your programming language. These types are also useful in debugging executables with no debugging symbol table information. The following table describes the built-in types:
Type String
Language 
Size
Description
$address
C
void*
Void pointer (address).
$char
C
char
Character.
$character
Fortran
character
Character.
$code
C
architecture-dependent
Machine instructions.
The size used is the number of bytes required to hold the shortest instruction for your computer.
$complex
Fortran
complex
Single-precision floating-point complex number.
The complex types contain a real part and an imaginary part, which are both of type real.
$complex_8
Fortran
complex*8
A real*4-precision floating-point complex number.
The complex*8 types contain a real part and an imaginary part, which are both of type real*4.
$complex_16
Fortran
complex*16
A real*8-precision floating-point complex number.
The complex*16 types contain a real part and an imaginary part, which are both of type real*8.
$double
C
double
Double-precision floating-point number.
$double_precision
Fortran
double precision
Double-precision floating-point number.
$extended
C
architecture-dependent; often long double
Extended-precision floating-point number. Extended-precision numbers must be supported by the target architecture. In addition, the format of extended floating point numbers varies depending on where it's stored. For example, the x86 register has a special 10-byte format, which is different than the in-memory format. Consult your vendor’s architecture documentation for more information.
$float
C
float
Single-precision floating-point number.
$int
C
int
Integer.
$integer
Fortran
integer
Integer.
$integer_1
Fortran
integer*1
One-byte integer.
$integer_2
Fortran
integer*2
Two-byte integer.
$integer_4
Fortran
integer*4
Four-byte integer.
$integer_8
Fortran
integer*8
Eight-byte integer.
$logical
Fortran
logical
Logical.
$logical_1
Fortran
logical*1
One-byte logical.
$logical_2
Fortran
logical*2
Two-byte logical.
$logical_4
Fortran
logical*4
Four-byte logical.
$logical_8
Fortran
logical*8
Eight-byte logical.
$long
C
long
Long integer.
$long_long
C
long long
Long long integer.
$real
Fortran
real
Single-precision floating-point number.
When using a value such as real, be careful that the actual data type used by your computer is not real*4 or real*8, since different results can occur.
$real_4
Fortran
real*4
Four-byte floating-point number.
$real_8
Fortran
real*8
Eight-byte floating-point number.
$real_16
Fortran
real*16
Sixteen-byte floating-point number.
$short
C
short
Short integer.
$string
C
char
Array of characters.
$void
C
long
Area of memory.
$wchar
C
platform-specific
Platform-specific wide character used by wchar_t data types
$wchar_s16
C
16 bits
Wide character whose storage is signed 16 bits (not currently used by any platform)
$wchar_u16
C
16 bits
Wide character whose storage is unsigned 16 bits
$wchar_s32
C
32 bits
Wide character whose storage is signed 32 bits
$wchar_u32
C
32 bits
Wide character whose storage is unsigned 32 bits
$wstring
C
platform-specific
Platform-specific string composed of $wchar characters
$wstring_s16
C
16 bits
String composed of $wchar_s16 characters (not currently used by any platform)
$wstring_u16
C
16 bits
String composed of $wchar_u16 characters
$wstring_s32
C
32 bits
String composed of $wchar_s32 characters
$wstring_u32
C
32 bits
String composed of $wchar_u32 characters