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

Viewing single element of a structure across an array of such structures

acar
Beginner
253 Views
Hi, in my development work I often have the need to view a particular element of a data structure across an array of such structures. For example, if I define an array of example structures as below:
type(example)
logical::test
integer::i,j,k
real(8)::x,y,z
end type (example)
type(example)::examples(10)
Then I might want to view examples(1:10)%test. This does not seem to be possible in debug mode since if I type examples(1:10)%test into the watch window I get the error 'examples(1:10)' is not a structure. This is possibly illogical since one can assign examples(1:10)%test=.false. for example.
Question: Is there a quick way round this or, if not, is this a feature that might be included in future versions?
Thanks, ACAR.
0 Kudos
1 Solution
Steven_L_Intel1
Employee
253 Views
This is an existing feature request, ID DPD200045287. I will add your request to it. I don't know of a way around this at present.

View solution in original post

0 Kudos
4 Replies
Steven_L_Intel1
Employee
254 Views
This is an existing feature request, ID DPD200045287. I will add your request to it. I don't know of a way around this at present.
0 Kudos
acar
Beginner
253 Views
Thanks Steve. I can cope at present but I would certainly use such a feature.
0 Kudos
Andrew_Smith
Valued Contributor I
253 Views
Me too please!
0 Kudos
Steven_L_Intel1
Employee
253 Views

As of Parallel Studio XE 2017, you can now watch an array element or section of a component. You can't assign to an array slice this way, but can assign to individual elements.

0 Kudos
Reply