       subroutine tabhed(itext,lamda,isys,dmax,ncor,schr,itech,iver)    TABH001
c ---------------------------------------------------                   TABH002
c      writes header for output table  (XLAT)                           TABH003
c ---------------------------------------------------                   TABH004
c      version 3.0 last revised 23.2.89 ETH-LNS                         TABH005
c ---------------------------------------------------                   TABH006
                                                                        TABH007
       character systm*12(4) ,itext*70                                  TABH008
       real*4 lamda                                                     TABH009
                                                                        TABH010
       data (systm(i),i=1,4)/'cubic','tetragonal','hexagonal',          TABH011
     &                       'orthorhombic'/                            TABH012
                                                                        TABH013
      write(6,'(a1)') char(12)                                          TABH014
      write(6,'(/a,a3,a,a)')' XLAT (C) Version ',iver,' - Least ',      TABH015
     &      'squares refinement of cell constants'                      TABH016
      write(6,'(a1,/,a1)')' ',' '                                       TABH017
      write(6,'(1x,a,/,1x,35(''=''))') itext                            TABH018
      write(6,2001) systm(isys), lamda                                  TABH019
                                                                        TABH020
      If (dmax.NE.0) write  (6,2002) dmax                               TABH021
      if (schr.ne.0.0) write  (6,2003) schr                             TABH022
      if (ncor.eq.0) write (6,2004)                                     TABH023
      if (ncor.eq.1) write (6,2005)                                     TABH024
      if (ncor.eq.2) write (6,2006)                                     TABH025
      if ((itech.eq.2.or.itech.eq.4).and.(ncor.ne.2)) write(6,2007)     TABH026
                                                                        TABH027
 2001 format (1H ,'System: ',1x,a,/,' Wavelength = ',F8.5,' A')         TABH028
 2002 format (1H ,'Maximum accepted error for theta :',f4.2,' deg')     TABH029
 2003 format(' Shrinkage of film = ',F5.2,' mm')                        TABH030
 2004 format(1x,'Correction for angular variation of drift')            TABH031
 2005 format(1x,'No correction for angular variation of drift')         TABH032
 2006 format(1x,'No drift correction employed')                         TABH033
 2007 format(1x,'Warning - you are using drift correction while employinTABH034
     1g internal standard')                                             TABH035
                                                                        TABH036
      end                                                               TABH037
                                                                        TABH038
