Using the Array Viewer in the Debugger

If you have the Professional or Enterprise Edition, you can use the Array Viewer in the debugger. Consider the following example program:

 PROGRAM ARRAY
   INTEGER I1, I2
   REAL VAL(5,5), X

   VAL = 0.0
   X = 1.0
   DO I1 = 1,5
     DO I2 = 1,5
        X = X*1.2
        VAL(I1,I2) = X
     END DO
   END DO

   PRINT *,VAL
 END PROGRAM ARRAY

To use the Array Viewer in the debugger:

  1. Start the debugger (see Debugging the Squares Example Program)
  2. Step through the parts of the program that generate the values of the array you want to view, perhaps after stopping program execution at a certain breakpoint.
  3. Select (click) the name of the array you want to view in the Array Viewer. For example:

    selecting an array

  4. In the Debug menu, click Fortran Array Viewer or click the Array Viewer button in the Fortran toolbar:

    fortran toolbar, with pointer on view fortran arrays button

    To display the Fortran toolbar:

    1. In the Tools menu, select Customize.
    2. Click the Toolbars tab.
    3. Set the Fortran toolbar check box.

    The Array Viewer as well as a Fortran Arrays window appears:

    array viewer and fortran arrays window

    In the upper part (data window), Array Viewer displays the values of the array elements for VAL.

    In the lower part (graph window), the view shown for array VAL is a two-dimensional view. You can also display other types of views, such as a height plot (in the View menu, click Height Plot).

    Initially, the Fortran Arrays window shows the current array being displayed and its status.

  5. After your program changes the data in the Array being viewed, you can:
  6. The Fortran Arrays window allows you to:

    To Do This: In the Fortran Arrays Window, Do This:
    Display a different array in the existing Array Viewer Click the Name column and type an array name
    Display a different array in a new instance of the Array Viewer Click in the last row of the Name column, type the array name, and press Enter (Return). A new instance of Array Viewer appears for the specified array.
    Update the displayed array's values Double-click the line for the array
    Discontinue using the Array Viewer (removes the name from the Fortran Arrays window) Either stop the debugger (Debug menu, Stop Debugging item) or repeatedly select the array name and click the Delete key.
    Create a detached instance of Array Viewer (not associated with the debugger) Click on an array in the Name column and press the Escape (Esc) key. This removes the array name from the Fortran Arrays window and creates a detached instance of the Array Viewer that remains after the debugging session ends.

For more information on using the Array Viewer: