Fortran 90

Although Fortran is said to be an old-fashioned language, it is still widely used by the scientific programming community.  Apparently that's down to what they call 'institutional inertia'.  Though the Fortran they use now isn't quite the same as the Fortran that they used in the 1950s.  And there is a school of thought to the effect that Fortran as a whole remains old-fashioned and that it's time to move on.

But for the last few years, I was one of these people made to use F90 for my academic research.  I figured I ought to try my hand at writing a quine while I still have access to an F90 compiler.  So here it is:

 Program QUINE
    character*51::code(16),li
    integer::lin,qn,lqn
    data code/&
       'Program QUINE                                      ',&
       '   character*51::code(16),li                       ',&
       '   integer::lin,qn,lqn                             ',&
       '   data code/&                                     ',&
       '   do lin=1,4;print*,code(lin);enddo               ',&
       '   do lin=1,15                                     ',&
       '      li=code(lin);qn=index(li,'''''''');lqn=0     ',&
       '      do while(qn/=0)                              ',&
       '         li=li(:lqn+qn-1)//''''''''//li(lqn+qn:50) ',&
       '         lqn=lqn+qn+1;qn=index(li(lqn+1:),'''''''')',&
       '      enddo                                        ',&
       '      print*,''      '''''',li,'''''',&''          ',&
       '   enddo                                           ',&
       '   print*,''      '''''',code(16),''''''/''        ',&
       '   do lin=5,16;print*,code(lin);enddo              ',&
       'end Program QUINE                                  '/
    do lin=1,4;print*,code(lin);enddo
    do lin=1,15
       li=code(lin);qn=index(li,'''');lqn=0
       do while(qn/=0)
          li=li(:lqn+qn-1)//''''//li(lqn+qn:50)
          lqn=lqn+qn+1;qn=index(li(lqn+1:),'''')
       enddo
       print*,'      ''',li,''',&'
    enddo
    print*,'      ''',code(16),'''/'
    do lin=5,16;print*,code(lin);enddo
 end Program QUINE