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:
To display the Fortran toolbar:
The Array Viewer as well as a Fortran Arrays window appears:
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.
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: