df_get_val_logical Function

public function df_get_val_logical(df, row_index, col_index) result(val)

Get single logical value from data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(in) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index

Return Value logical


Source Code

    function df_get_val_logical(df, row_index, col_index) result(val)
        type(data_frame), intent(in) :: df
        integer, intent(in) :: row_index, col_index
        logical :: val

        type(column) :: data_col

        if (col_index < 1 .or. col_index > df % ncols()) error stop "column index out of range"

        data_col = df % get_data_col(col_index)
        if (data_col % get_type() /= LOGICAL_NUM) error stop "column is not logical type"

        val = data_col % getl(row_index)
    end function df_get_val_logical