Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Accessing variable inside subroutine

awa5114
Beginner
73 Views

I know it is possible to access a variable inside a module using the following syntax

MODULENAME::VariableName

i.e adding a watch throught the command window in VS would read Debug.AddWatch MODULENAME::VariableName. 

However is it possible to access a variable defined/declared inside a subroutine which in turn is inside a module? For instance

MODULENAME::SubroutineName::VariableInsideSubroutineName

I already tried the above syntax but it doesn't work. Is there an alternate syntax to accomplish this? 

0 Kudos
1 Reply
Arjen_Markus
Valued Contributor III
73 Views

No, that is only possible if the subroutine is actually active. Otherwise the variable may not even exist. I am not aware of any syntax that makes you access SAVEd variables - they would be persistent, so in principle it ought to be possible to access them.

Reply