50 class(TableTermType) :: this
51 character(len=*),
intent(in) :: tag
52 integer(I4B),
intent(in) :: width
53 integer(I4B),
intent(in),
optional :: alignment
55 character(len=LINELENGTH) :: string
56 character(len=LINELENGTH) :: tstring
57 character(len=LINELENGTH),
allocatable,
dimension(:) :: words
58 integer(I4B) :: nwords
66 call this%allocate_scalars()
71 if (
present(alignment))
then
72 this%alignment = alignment
74 this%alignment = tabcenter
80 call parseline(tag, nwords, words, 0)
85 ilen = len(trim(words(i)))
86 if (ilen > width)
then
87 words(i) (width:width) =
'.'
88 do j = width + 1, ilen
101 string = trim(adjustl(words(i)))
104 if (len(trim(adjustl(string))) > 0)
then
105 tstring = trim(adjustl(tstring))//
' '//trim(adjustl(words(j)))
107 tstring = trim(adjustl(words(j)))
109 ilen = len(trim(adjustl(tstring)))
112 else if (ilen <= width)
then
124 ilen = len(trim(adjustl(words(i))))
126 this%nheader_lines = this%nheader_lines + 1
131 allocate (this%initial_lines(this%nheader_lines))
132 do i = 1, this%nheader_lines
133 this%initial_lines(i) = words(i) (1:width)