46 class(TableTermType) :: this
47 character(len=*),
intent(in) :: tag
48 integer(I4B),
intent(in) :: width
49 integer(I4B),
intent(in),
optional :: alignment
51 character(len=LINELENGTH) :: string
52 character(len=LINELENGTH) :: tstring
53 character(len=LINELENGTH),
allocatable,
dimension(:) :: words
54 integer(I4B) :: nwords
61 call this%allocate_scalars()
66 if (
present(alignment))
then
67 this%alignment = alignment
69 this%alignment = tabcenter
75 call parseline(tag, nwords, words, 0)
80 ilen = len(trim(words(i)))
81 if (ilen > width)
then
82 words(i) (width:width) =
'.'
83 do j = width + 1, ilen
96 string = trim(adjustl(words(i)))
99 if (len(trim(adjustl(string))) > 0)
then
100 tstring = trim(adjustl(tstring))//
' '//trim(adjustl(words(j)))
102 tstring = trim(adjustl(words(j)))
104 ilen = len(trim(adjustl(tstring)))
107 else if (ilen <= width)
then
119 ilen = len(trim(adjustl(words(i))))
121 this%nheader_lines = this%nheader_lines + 1
126 allocate (this%initial_lines(this%nheader_lines))
127 do i = 1, this%nheader_lines
128 this%initial_lines(i) = words(i) (1:width)