subroutine ecrlab(norb,label)
implicit none
integer :: norb,i,l
character(*) :: label(norb)
character(11) :: format

l=maxval(len_trim(label))
do i=1,norb
   if(mod(i,4)==0.or.i==norb) then
      write(6,'(i4,1x,a)') i,trim(label(i))
   else
      write(6,'(i4,1x,a,a)',advance='no') i,label(i)(1:l),' | '
   endif
enddo
end
