Initialize a new data frame
Creates a new empty data frame with optional character length specification
@param[in,out] this The data frame instance @param[in] char_len Optional maximum character length for string columns (default: 100)
Note
If the data frame is already initialized, it will be destroyed first
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(data_frame), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | char_len |
subroutine df_constructor(this, char_len) class(data_frame), intent(inout) :: this integer, intent(in), optional :: char_len if (this % initialized) call this % destroy() this % num_cols = 0 this % with_headers = .false. if (present(char_len)) then this % max_char_len = char_len else this % max_char_len = MAX_CHAR_LEN_DEFAULT end if this % initialized = .true. end subroutine df_constructor