fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

Labeled case statements not formatted correctly

Open sriram-LANL opened this issue 1 year ago • 3 comments
trafficstars

the following input:

  ! Fails: Labelled
  casetest:select case(i)
  case (1)
     write(*,*) 'nay'
  end select casetest

  ! Works: Not labelled
  select case(i)
  case (1)
     write(*,*) 'yay'
  end select

processed with python3 fprettify -i 4 test.F90 results in:

  ! Fails: Labelled
  casetest:select case(i)
  case (1)
  write (*, *) 'nay'
  end select casetest

  ! Works: Not labelled
  select case (i)
  case (1)
      write (*, *) 'yay'
  end select

Note that the first case statement is not correctly indented.

Incidentally labelled do statements work just fine!

PS: this is a great tool - thanks for making it available

sriram-LANL avatar Sep 11 '24 19:09 sriram-LANL