Topic: List CALL statements

By using the 'Text Search' icon to switch to the search panel, one can search for a text string anywhere in the current project, obtain a list of the source files containing it, then double click one of them and open it with teh cursor on the searched-for string.

I'd very much like to see this expanded to search for the code that calls a particular subroutine.  I envisage right clicking (or double-clicking) on a subroutine or function title (at the top of that sub-program), or selecting a menu entry obtained from a right click anywhere inside the routine, to switch to the text search panel with a list of all instances where that sub-program is called or invoked.

It sounds not too hard to implement and it would be a nice addition.
---
John

Re: List CALL statements

John,

This feature is on the todo list, and some of the necessary code already exists.  The problem is that this search is simple in only specific circumstances.  If you're programming using Fortran 90+ modules, this search becomes drastically more complicated quickly.  Consider for a moment a module mod1 that contains a subroutine named sub1.  To find all references to this particular sub1, you first have to find all subprogram units that have used mod1.  You then also need to make sure that it hasn't limited the use of mod1 via an only: specification.  Additionally, it's perfectly valid for mod2 to contain a subroutine also named sub1.  However, in your search, you wouldn't want to include that result as it isn't the sub1 you're looking for. 

The problem is somewhat complicated though obviously solvable.  The autocomplete function does solve the issue for the current position in code right now, for example.  It should only report visible (within the scope) functions, subroutines, and modules as suggestions. 

There is some initial work towards exactly what you're suggesting.  However, it was sidetracked by some other more important projects (the debugger, mainly).  I do plan on getting back to it now.  No promises on a delivery time frame, though.

Jeff Armstrong
Approximatrix, LLC