Help with Fortran modules
An executable that contains Fortran modules presents a special set of problems:
If there are many modules, and they all contain many procedures and variables (each of which can have the same name as something else in a separate Fortran module), keeping track of which name refers to which entity can be difficult.
When the Locals or Current Line(s) tabs (in the Variables window) display one of these variables, to which Fortran module does the variable belong?
How do you refer to a particular module variable in the Evaluate window?
How do you quickly jump to the source code for a particular Fortran module procedure?
To help with these problems, use the Fortran Modules tab in the Project Navigator window.
When a session starts, Fortran module membership is automatically found from the information compiled into the executable.
A list of Fortran modules found is displayed in a simple tree view in the Fortran Modules tab of the Project Navigator window.
To expand a module, click on the + symbol to the left of the module name. This displays a list of member procedures, member variables, and the current values of those member variables.
When you click on one of the procedure names the Source
Code viewer jumps to that procedure’s location in the source code.
In addition, the return type of the procedure is displayed at the bottom
of the Fortran Modules tab. Fortran subroutines will have a return
type of VOID ()
.
When you click on one of the displayed variable names, the type of that variable is displayed at the bottom of the Fortran Modules tab.
A module variable can be dragged and dropped into the Evaluate window. Here, all of the usual Evaluate window functionality applies to the module variable. To help with variable identification in the Evaluate window, module variable names are prefixed with the Fortran module name and two colons ::.
If you right-click in the Fortran Modules tab, you can use the context menu to send the variable to the Evaluate window, Multi-Dimensional Array Viewer, or Cross-Process Comparison View window.
There are some limitations to the information displayed in the Fortran Modules tab:
The Fortran Modules tab is not displayed if the underlying debugger does not support the retrieval and manipulation of Fortran module data.
The Fortran Modules tab displays an empty module list if the debug data for the Fortran modules is not present or is not in a recognized format.
The debug data compiled into an executable does not include any indication of the module
USE
hierarchy. For example, if module A USEs module B, the inherited members of module B are not shown under the data displayed for module A. Consequently, the Fortran Modules tab shows the moduleUSE
hierarchy in a flattened form, one level deep.