Using Slices in the Variable Command

When you use the View > Lookup Variable command to display a Variable Window, you can include a slice expression as part of the variable name. Specifically, if you include an array name followed by a set of slice descriptions in the variable dialog box, TotalView initializes the slice field in the Variable Window to the slice descriptions that you specified.

If you include an array name followed by a list of subscripts in the variable dialog box, TotalView interprets the subscripts as a slice description rather than as a request to display an individual value of the array. As a result, you can display different values of the array by changing the slice expression.

For example, suppose that you have a 10-element by 10-element Fortran array named small_array, and you want to display element (5,5). Using the View > Lookup Variable command, you enter small_array(5,5). This sets the initial slice to (5:5,5:5).

You can tell TotalView to display one of the array's values by enclosing the array name and subscripts (that is, the information normally included in a slice expression) within parentheses, such as (small_array(5,5)). In this case, the Variable Window just displays the type and value of the element and does not show its array index.

Variable Window for small_array

The top left Variable Window in this figure shows the information for (small_array(5:5)). The bottom right Variable Window shows the information displayed for small_array(5:5).

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0