Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Evaluating Arrays

You evaluate arrays the same way you evaluate other types of variables.

The following example is a sample Fortran array:

integer*4 arr(1:6, 4:7)

To evaluate the array, use the print command. For example:

(dbx) print arr(2,4)

    The dbx print command enables you to evaluate part of a large array. Array evaluation includes:

  • Array slicing – Prints any rectangular, n-dimensional box of a multidimensional array.

  • Array striding – Prints certain elements only, in a fixed pattern, within the specified slice, which might be an entire array.

You can slice an array, with or without striding. (The default stride value is 1, which means print each element.)