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

Debugging and module's global vars scope

matteo_massaro
初學者
901 檢視
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 積分
3 回應
onkelhotte
新貢獻者 II
901 檢視
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
matteo_massaro
初學者
901 檢視
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?

onkelhotte
新貢獻者 II
901 檢視
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

回覆