        subroutine BLDOUT(SUBS,NAME)
      include 'UNITS.INC'
      include 'TRANS.INC'
        integer CRDCOL, SUBS(7), LENGTH(3)
        integer ITS,ITDTD,LENT,I,IM1,LENX,J
        character*1 SEP, LGN(6), IS(2), NAME(6), ARRAY(5,3)
        character*1 fmt(34),OUTPUT(13),OUTFMT(7,5)
      data fmt /'(',' ','/',',','1','X',',',' ','A','1',',',
     &' ',' ','A','1',',','1','X',',',
     &'2','A','1',',','1','X',',',' ',' ',' ',' ',' ',' ',' ',')'/
        data IS /'i','s'/
        data OUTFMT /
     &'1', 'P', 'G', '1', '1', '.', '4',
     &'1', 'P', 'G', '1', '1', '.', '4',
     &'1', 'P', 'G', '1', '1', '.', '4',
     &' ', ' ', 'I', '1', '1', ' ', ' ',
     &' ', ' ', 'A', '1', ' ', ' ', ' '/
        data LGN/'1','2','3','4','5','6'/
      ICL1 = SUBS(1)
      ICL2 = SUBS(2)
      ICL3 = SUBS(3)
      ITS = SUBS(4)
      ITDTD = SUBS(5)
      LENT = SUBS(6)
      fmt(8) = LGN(LENT)
      do 100 I = 1, 7
         fmt(I+26) = OUTFMT(I,ITDTD)
100   continue
      do 110 I = 1, 3
         LENGTH(I) = 0
110   continue
      CRDCOL = 1
      OUTPUT(1) = ' '
      if (ITS.eq.1) go to 140
      if (ITS.gt.1) call ITOS (ICL1,ARRAY(1,1),LENGTH(1))
      if (ITS.gt.2) call ITOS (ICL2,ARRAY(1,2),LENGTH(2))
      if (ITS.gt.3) call ITOS (ICL3,ARRAY(1,3),LENGTH(3))
      CRDCOL = 0
      do 130 I = 2, 4
         IM1 = I-1
         if (I.gt.ITS) go to 130
         SEP = '('
         if (IM1.gt.1) SEP = ','
         CRDCOL = CRDCOL+1
         OUTPUT(CRDCOL) = SEP
         LENX = LENGTH(IM1)
         do 120 J = 1, LENX
            CRDCOL = CRDCOL+1
            OUTPUT(CRDCOL) = ARRAY(J,IM1)
120      continue
130   continue
      CRDCOL = CRDCOL+1
      OUTPUT(CRDCOL) = ')'
140   continue
      call ITOS (CRDCOL,ARRAY(1,1),LENX)
      if (LENX.eq.2) go to 150
      fmt(12) = ' '
      fmt(13) = ARRAY(1,1)
      go to 160
150   continue
      fmt(12) = ARRAY(1,1)
      fmt(13) = ARRAY(2,1)
160   continue
      go to (170,180,190,200,210), ITDTD
170   continue
      write (TTYOUT(MACHNO),5000)
5000  format (//' Complex data specified, not implemented.'/)
      go to 230
180   continue
      write (TTYOUT(MACHNO),fmt) (NAME(I),I=1,LENT),(OUTPUT(I),I=1,
     &   CRDCOL),IS,R8
      go to 220
190   continue
      write (TTYOUT(MACHNO),fmt) (NAME(I),I=1,LENT),(OUTPUT(I),I=1,
     &   CRDCOL),IS,R4
      go to 220
200   continue
      write (TTYOUT(MACHNO),fmt) (NAME(I),I=1,LENT),(OUTPUT(I),I=1,
     &   CRDCOL),IS,I2
      go to 220
210   continue
      write (TTYOUT(MACHNO),fmt) (NAME(I),I=1,LENT),(OUTPUT(I),I=1,
     &   CRDCOL),IS,L1
220   continue
230   continue
      return
      end
