Menu

Fortran 90 code folding

2008-01-12
2012-11-13
  • Nobody/Anonymous

    I am trying to get code folding works in notepad++. The problem I encounter is that, the keywords for folding cannot contain space.

    For the keyword type, it can ended with "end type" as the following:
    type A
      complex*16, pointer:: p
    end type A

    However, type can appeared alone too.
    real function B
      type (A)::C
      xxxx
    end function

    Therefore, for the closing keyword, it must be set to "end type" instead of "end" only. Otherwise,  folding cannot works properly.

    Can anyone helps?
    Thank you very much!

     
    • Nobody/Anonymous

      I don't see why entering function as keyword can solve the problem.

      I have tried a piece of code like this:

      type A
          complex*16 pointer::p
      end type A

      real function B
      type (A)::C

      end function

      with folder open: type function
      and close folder: end

      If I fold the 1st line "type A", it will close the whole code. Maybe it doesn't know how to deal with both folder open (type) and folder close (end) in the same line?

      Thank you.

       
    • Nobody/Anonymous

      Yes, enter function as keyword to, to make sure all endings are correctly matched.
      You could have found this suggestion if you did search the forums for similar questions.