table_reader Derived Type

type, public :: table_reader


Components

Type Visibility Attributes Name Initial
character(len=MAX_NAME_LEN), public :: header_cols(MAX_TABLE_COLS) = ''
character(len=MAX_NAME_LEN), public :: row_field(MAX_TABLE_COLS) = ''
character(len=MAX_LINE_LEN), public :: line = ''
character(len=:), public, allocatable :: left_str
character(len=:), public, allocatable :: file_name
character(len=:), public, allocatable :: min_cols
character(len=80), public :: titldum = ""
integer, public :: nrow = 0
integer, public :: ncols = 0
integer, public :: nfields = 0
integer, public :: skipped_rows = 0
integer, public :: start_row_numbr = 1
integer, public :: unit = 0
logical, public :: found_header_row = .false.
logical, public, allocatable :: col_okay(:)
logical, public :: file_exists = .false.

Type-Bound Procedures

procedure, public :: init

  • public subroutine init(self, unit, file_name, start_row_numbr)

    read all curve number data from cn.tbl

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self
    integer, intent(in), optional :: unit
    character(len=*), optional :: file_name
    integer, intent(in), optional :: start_row_numbr

procedure, public :: get_num_data_lines

  • public function get_num_data_lines(self) result(imax)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self

    Count the number of valid data rows in the table file

    Read more…

    Return Value integer

procedure, public :: get_header_columns

  • public subroutine get_header_columns(self, eof)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self
    integer :: eof

procedure, public :: get_row_fields

  • public subroutine get_row_fields(self, eof)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self
    integer, intent(out) :: eof

procedure, public :: output_column_warning

procedure, public :: get_row_idx

  • public function get_row_idx(self) result(row)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self

    Return Value integer

procedure, public :: get_col_count

  • public function get_col_count(self) result(col)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self

    Return Value integer

procedure, public :: min_header_cols

  • public subroutine min_header_cols(self, min_cols)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self
    character(len=*), intent(in) :: min_cols

procedure, public :: min_req_cols

  • public subroutine min_req_cols(self, min_cols)

    Arguments

    Type IntentOptional Attributes Name
    class(table_reader), intent(inout) :: self
    character(len=*), intent(in) :: min_cols