1 (edited by davidb 2013-07-07 08:56:25)

Topic: File Outline not correct sometimes

When a module contains a subroutine, and the subroutine itself contains an internal subroutine, the file outline view is not correct.

Module subroutines that follow the internal subroutine are shown as belonging to the file, instead of the module.

For example, the following code:

module foo


    subroutine a
       ! etc
          subroutine x
          end subroutine x
    end subroutine a
   ! This subroutine is part of foo, but is shown as part of the file.
   subroutine b
       ! etc
   end subroutine b

end module foo

ALSO, when a module subroutine or function is PURE the view is similarly incorrect.

For example,

pure function xyz(a)



Re: File Outline not correct sometimes


This is currently a bug, yes.  The outline engine is incorrectly bars subroutines and functions from encapsulating other subroutines and functions via contains keywords.  I'll look into fixing this.

In more standard cases, the outline engine should pick up pure functions just fine (as in when they are not restricted to living inside the scope of another function or subroutine.  It does not properly identify pure subroutines, however. 

I'll go ahead and fix these problems.  Thanks for the report!

Jeff Armstrong
Approximatrix, LLC

Re: File Outline not correct sometimes

This seems to be fixed in 2.9.

At last I can use the outline view smile