df_set_val_real Subroutine

public subroutine df_set_val_real(df, row_index, col_index, val)

Set single real value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
real(kind=rk), intent(in) :: val

Source Code

    subroutine df_set_val_real(df, row_index, col_index, val)
        type(data_frame), intent(inout) :: df
        integer, intent(in) :: row_index, col_index
        real(rk), intent(in) :: 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() /= REAL_NUM) error stop "column is not real type"

        call data_col % changer(row_index, val)
        call df % set_data_col(col_index, data_col)
    end subroutine df_set_val_real