14 integer,
parameter :: SPEC_LINE_MAX_LEN = 10000
16 integer,
parameter :: SPEC_LINE_MAX_VAR_LEN = 300
29 character(len=SPEC_LINE_MAX_VAR_LEN) :: name
31 character(len=SPEC_LINE_MAX_VAR_LEN),
pointer :: data(:)
44 allocate(spec_line%data(0))
56 integer,
intent(in) :: n_data
58 allocate(spec_line%data(n_data))
70 deallocate(spec_line%data)
84 if (
size(to_spec_line%data) /=
size(from_spec_line%data))
then
87 size(from_spec_line%data))
89 to_spec_line%name = from_spec_line%name
90 to_spec_line%data = from_spec_line%data
101 character(len=*),
intent(inout) :: string
103 integer :: hash_index
105 hash_index = index(string,
'#')
106 if (hash_index > 0)
then
107 string = string(1:(hash_index - 1))
119 character(len=*),
intent(inout) :: string
124 if (ichar(string(i:i)) == 9)
then
137 character(len=*),
intent(inout) :: string
141 if (len_trim(string) > 0)
then
142 i = verify(string,
' ')
subroutine spec_line_strip_comment(string)
Strip the comments from a string. Comments are everything after the first # character.
subroutine spec_line_strip_leading_spaces(string)
Strip leading spaces from a string.
A single line of input data, split at whitespace.
subroutine spec_line_copy(from_spec_line, to_spec_line)
Copies a spec_line.
Common utility subroutines.
subroutine spec_line_tabs_to_spaces(string)
Expand all tabs in a string into single spaces (one tab makes one space).
A single line of formatted test for input.
subroutine spec_line_allocate_size(spec_line, n_data)
Allocates memory for a spec_line of the given size.
subroutine spec_line_allocate(spec_line)
Allocates memory for a spec_line.
subroutine spec_line_deallocate(spec_line)
Frees all storage.