      program teststr
      implicit none
      character(len=8) :: str(5)
      integer :: i
!
      str(:) = '        '
      write(6,"('# blank str = ',i3)") count(len_trim(str(:))==0)
      do i=1,5
        write(6,"('i=',i3,' len_trim(str(i))=',i3,' str(i)=',a)")
     |    i,len_trim(str(i)),str(i) 
      enddo
      end program teststr
