Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some limitations (or bugs in some way) #101

Open
Jellby opened this issue Mar 12, 2021 · 0 comments
Open

Some limitations (or bugs in some way) #101

Jellby opened this issue Mar 12, 2021 · 0 comments
Labels
bug non-critical bug (or with workaround)

Comments

@Jellby
Copy link

Jellby commented Mar 12, 2021

After creating #99 and using it for a while, here are some of the limitations or problems I've found (that are not solved with the PR):

  • Keyword arguments to intrinsic functions or similar are not recognized as keywords and changed to upper-/lowercase. I refer to words like kind, inout, iostat or default (in real(kind=real64), intent(inout), open(10,iostat=err) and case default.
  • go to (two words) is not recognized either. See https://stackoverflow.com/a/63451186.
  • The sequence (/ in a format statement is misinterpreted as an array constructor, and causes a misalingment in continuation lines.
  • Numbered do loops (ending in a labeled continue statement) are not properly handled with respect to the indent.
  • Spacing after commas/intrinsics is confused by parentheses (as in implied dos).

A small sample that contains all these cases:

      subroutine foo(strings,flag)
      use iso_fortran_env, only: int32
      implicit none
      character(LeN=10), intent(In) :: strings(3)                               ! len, in
      integer(KiNd=InT32), intent(iN) :: flag                                   ! kind, in
      integer :: i, err
      select case (flag)
         case (1)
            open(10, IoStAt=err)                                                ! iostat
            if (err /= 0) Go To 100                                             ! go to
            write(10,'("(",a,")(",a,")(",a,")")') (strings(i)(1:10),i=1,3)      ! )(
            close(10)
            write(6,200) 'title',(strings(i)(1:10),i=1,3)                       ! ,(
         case DeFaUlT                                                           ! default
            do 20 i=1,10
              write(6,*) i
            20 continue                                                         ! numbered do
            if (flag < 0) then
               write(6,*) 'Negative'
            elseif (flag > 10) then                                             ! feature request: change "elseif" to "else if"
               write(6,*) 'Large'
            end if
      end select
100   return
200   format (/a &                                                              ! (/ misalignment
              /'(',a,')(',a,')(',a,')')
      end subroutine
@pseewald pseewald added the bug non-critical bug (or with workaround) label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug non-critical bug (or with workaround)
Projects
None yet
Development

No branches or pull requests

2 participants