Returns the header as a type(csv_string)
array.
(read
must have already been called to read the file).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csv_file), | intent(inout) | :: | me | |||
type(csv_string), | intent(out), | dimension(:), allocatable | :: | header | ||
logical, | intent(out) | :: | status_ok |
subroutine get_header_csv_str(me,header,status_ok) implicit none class(csv_file),intent(inout) :: me type(csv_string),dimension(:),allocatable,intent(out) :: header logical,intent(out) :: status_ok integer :: i !! column counter if (allocated(me%header)) then allocate(header(me%n_cols)) do i=1,me%n_cols header(i) = me%header(i) end do status_ok = .true. else if (me%verbose) write(error_unit,'(A)') 'Error: no header in class.' status_ok = .false. end if end subroutine get_header_csv_str