Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

How can I show all the elements of an array when I was debugging?

quyunfeimsu_edu
Beginner
718 Views

21373-array.bmp

I'm using Visual Fortran compiler to debug my program, and I need to look at all the element of the array, but it only shows part of elements. Like picture shows above: only shp(1:4,1) were displayed, butthe shp is defined as 4*8 matrix in this subroutine. How can I show all of the elements of shp? anyone can tell me?

Thanks,
Yofee

0 Kudos
5 Replies
Steven_L_Intel1
Employee
718 Views
You're looking at the tooltip, which by necessity is abbreviated. Find your variable in the Locals tab, typically at the bottom-left of the screen.
0 Kudos
quyunfeimsu_edu
Beginner
718 Views
You're looking at the tooltip, which by necessity is abbreviated. Find your variable in the Locals tab, typically at the bottom-left of the screen.

Thank you very much for replying!
I also look at the locals tab, and it still doesn'tshow me the whole array. I type shp(1,2), one of the element of the array, in quickwatch to see its existence in locally.
How can I see the whole picture of the array?

Thanks again!
Yofee
0 Kudos
Steven_L_Intel1
Employee
718 Views
It looks to me as if it is showing the whole array. How is the array declared?
0 Kudos
quyunfeimsu_edu
Beginner
718 Views
definition+of+shp.docx
It looks to me as if it is showing the whole array. How is the array declared?

Thanks for Steve's help:
I don't know what's going on for me, the definition of this array, please seethe attached file "definition+of+shp.docx".
Except this, is there any alternative conevient ways to let me display all the elements that I want?

Yofee
0 Kudos
Steven_L_Intel1
Employee
718 Views
Ok, that helps. You declared shp as an assumed-size array with * as the last dimension. The debugger has no idea how big the array is, so it uses 1. As you noted, you can access individual elements. You can also put shp(1:4,1:7) in the watch window.

I'm a bit puzzled why you used * here when the source seems to know exactly the size of the array.

I'd also ask that, in the future, you attach text files or Fortran source files directly rather than Word documents.
0 Kudos
Reply