- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using Intel Fortran 9.1 integrated with Visual Studio 2005 Pro.
I have a question about global variables, which seem to be not accessible during debug time. Consider the following project:
program main
use use_global_var
call setQ(5d0)
print *, Q
end program
module use_global_var
use global_vars
contains
subroutine SetQ(x)
real(8) :: x
Q = x
end subroutine
end module
module global_vars
real(8) :: Q
end module
Variable Q which is visible to subroutine SetQ in module "use_global_var" is not accessible during debug time (in watch window I get "undefined variable Q"). Why is this so? Is there any way to see the value of those variables during debug.
Thanks,
Victor
I am using Intel Fortran 9.1 integrated with Visual Studio 2005 Pro.
I have a question about global variables, which seem to be not accessible during debug time. Consider the following project:
program main
use use_global_var
call setQ(5d0)
print *, Q
end program
module use_global_var
use global_vars
contains
subroutine SetQ(x)
real(8) :: x
Q = x
end subroutine
end module
module global_vars
real(8) :: Q
end module
Variable Q which is visible to subroutine SetQ in module "use_global_var" is not accessible during debug time (in watch window I get "undefined variable Q"). Why is this so? Is there any way to see the value of those variables during debug.
Thanks,
Victor
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As noted in the Building Applications manual section on debugging:
Specifying Module Variables
To view a module variable in a Watch window, specify the module name, followed by "::", followed by the variable name.
For example, to watch variable "bar" of module "foo", specify the following expression:
foo::bar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, thanks.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page