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

Module variables and debugging

tmcole
Beginner
555 Views
I am trying to view values for variables in a particular module that is used in a subroutine. All the variables that are actually used in the subroutine are available for viewing. However, any variable not used in the subroutine but present in the module is not available for viewing. Is this normal behavior? If so, why? Can I do anything so that the unused variables are available for viewing other than to include dummy assignment statements? Thanks.
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
555 Views
This is supposed to be fixed in latest VF versions, yet I think (but I couldn't swear) I still see it sometimes in 6.6B. In any case, the workaround is to type

module_name::variable_name

in Watch or QuickWatch window.

Jugoslav
0 Kudos
llynisa
Beginner
555 Views
I am reminded from this topic and Jugoslav's observations on C Strings in "Trouble with a very simple API" of a quirk of the debugger.

If one has:
Character*10  StrVar
StrVar = 'ABC123'C
StrVar(8:8) = 'X'


This displays StrVar in the debugger as 'ABC123' and the only way to see the 'X' is to display StrVar(8:).

It is clear that the debugger is C string-based, but it would have saved me a lot of grief in the past if I could have seen that there was garbage beyond the Nul. Just another warning to those mixing Fortran and C strings!

Alan
0 Kudos
Reply