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

Accessing variable inside subroutine

awa5114
Beginner
115 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
Honored Contributor I
115 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