Fortran code folding

Fortran code folding

2
NewbieNewbie
2

    Feb 21, 2005#1

    Can't seem to get fortran to code-fold. I've downloaded and added a fortran section to the wordlist.txt. And it works: there's coloring, the function list is populated (although I had to tweak the function definitions). There are no +/- marks in the margin, although it's set that way in Advanced | Syntax Highlighting and General | Display.

    Don't know what else I need. I look at language 2: VB and it has no other components, no open/close brace or open/close fold statements and it folds, although not on functions/subs.

    I must be missing something.

    El_Capitan
    El_Capitan

      May 12, 2005#2

      i tried to add code folding for fortran but it does not work
      I see the - for closing but nothing happens on clicking it

      I added to Fortran section
      /Open Fold Strings = "THEN" "ELSE" "DO" "FORALL" "SUBROUTINE"
      /Close Fold Strings ="ENDIF" "ENDDO" "END IF" "END DO" "END"

      what is wrong?
      bye
      martin

      112
      Power UserPower User
      112

        May 12, 2005#3

        phaenno wrote:i tried to add code folding for Fortran but it does not work
        I see the - for closing but nothing happens on clicking it

        I added to Fortran section
        /Open Fold Strings = "THEN" "ELSE" "DO" "FORALL" "SUBROUTINE"
        /Close Fold Strings ="END IF" "ENDDO" "END IF" "END DO" "END"

        what is wrong?
        bye
        martin
        I had a similar problem with BASIC. The problem is caused by the "END DO". I've had this confirmed by IDM. The way the folder works is that it finds the fold opener, and then looks for a closer. But because the design is sub-optimal, it sees the DO in the END DO as another opener instead of a closer.

        if you create
        DO
        END DO
        won't fold,
        DO
        ENDDO
        should.

        IDM are investigating ways to fix the problem.

        Paolo
        There is no such thing as an inconsistently correct system...
        Therefore, aim for consistency; in the expectation of reaching correctness!

        63
        Advanced UserAdvanced User
        63

          May 13, 2005#4

          I've been playing with code folding in RPG.

          I got a few things to work but I also had problems with IF's and ENDIF's.
          So I took a more conserative approach,

          Code: Select all

          /Open Fold Strings = "BEGSR"
          /Close Fold Strings = "ENDSR"
          Now I have my subroutine's folding, nice touch!

          I've been playing with Function List.

          Code: Select all

          /Function String = "BEGSR"
          /Function String 1 = "DO?"
          /Function String 2 = "IF?"
          I'm not completely happy with this but I'm still playing around.