In This Book

To print a portion of an array, enter the range as the subscript. Specify a range in the form element ..element for C, C++, and Pascal, and as element :element for FORTRAN. For example, the following command prints list[1] through list[3] in the C language array list:

print list[1..3]

\\parray\list[1]: 4

\\parray\list[2]: 2

\\parray\list[3]: 0

To specify a limit on the number of elements the print command displays, use the property array_dim_max command. For example, property array_dim_max 10 sets the limit at 10.

Examining Objects Referenced by Pointers

To examine an object referenced by a pointer, enter the print command and either dereference the pointer using language-sp eci￿c syntax or use the print command's -indirectoption.

For example, assume that C is the current language and that int_ptr contains the address of the variable num, whose value is 7. You could print the value pointed to by int_ptr using C language syntax for dereferencing pointers, as the following example illustrates:

print int_ptr

\\test_program\main\int_ptr: 7B03A558 print *int_ptr *\\test_program\main\int_ptr: 7

In languages that support special interpretation of pointers to characters:

Printing the value of a pointer will also print the string that is pointed to. Printing the value of a dereferenced poin ter will print a single character.

4-6 Viewing and Manipulating Target Program Data