split_category Subroutine

private subroutine split_category(variable, category, var_name)

Arguments

Type IntentOptional Attributes Name
type(CFG_var_t), intent(in) :: variable
character(len=CFG_name_len), intent(out) :: category
character(len=CFG_name_len), intent(out) :: var_name

Called by

proc~~split_category~~CalledByGraph proc~split_category split_category proc~cfg_write CFG_write proc~cfg_write->proc~split_category proc~cfg_write_markdown CFG_write_markdown proc~cfg_write_markdown->proc~split_category

Source Code

  subroutine split_category(variable, category, var_name)
    type(CFG_var_t), intent(in)          :: variable
    character(CFG_name_len), intent(out) :: category
    character(CFG_name_len), intent(out) :: var_name
    integer                              :: ix

    ix = index(variable%var_name, CFG_category_separator)

    if (ix == 0) then
       category = ""
       var_name = variable%var_name
    else
       category = variable%var_name(1:ix-1)
       var_name = variable%var_name(ix+1:)
    end if

  end subroutine split_category