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

Debugging and module's global vars scope

matteo_massaro
Beginner
805 Views
Hi,
I've got a quite annoying problem in debugging fortran projects with Visual Studio 2005. What happens is that during debugging I can't scope any module's global variable (scope window says 'Undefined Variable')! I don't know if it's related to the Visual Studio setup or whatelse but I'm constrained to assign module's global vars to some local vars and scope the local vars!

How can I solve this?
0 Kudos
3 Replies
onkelhotte
New Contributor II
805 Views
Quoting - matteo massaro
Hi,
I've got a quite annoying problem in debugging fortran projects with Visual Studio 2005. What happens is that during debugging I can't scope any module's global variable (scope window says 'Undefined Variable')! I don't know if it's related to the Visual Studio setup or whatelse but I'm constrained to assign module's global vars to some local vars and scope the local vars!

How can I solve this?

Update to a newer version of IVF.

Ive had the same problem with 10.1.025, but now I use 11.0.072 and now is shows thevalue.

When you cant update, use this workaround.As name use

moduleName::varname instead of varname


Markus
0 Kudos
matteo_massaro
Beginner
805 Views
Quoting - onkelhotte

Update to a newer version of IVF.

Ive had the same problem with 10.1.025, but now I use 11.0.072 and now is shows thevalue.

When you cant update, use this workaround.As name use

moduleName::varname instead of varname


Markus

Actually my module global var is defined as

TYPE(myType), PRIVATE :: var

I've tried with both

TYPE(myType), PRIVATE :: Modulename::var
TYPE(myType), PRIVATE , Modulename::var

but syntax error occurs. What's the correct syntax for that?

0 Kudos
onkelhotte
New Contributor II
805 Views
Quoting - matteo massaro

Actually my module global var is defined as

TYPE(myType), PRIVATE :: var

I've tried with both

TYPE(myType), PRIVATE :: Modulename::var
TYPE(myType), PRIVATE , Modulename::var

but syntax error occurs. What's the correct syntax for that?


You have use modulename::varnamein the VS debugger. In my case, I have the module sharedVariables and real*4 runtime as a variable. This works with your type declaration as well (bramme is a type I declared myself).

Markus

0 Kudos
Reply