check_list_size Function

private function check_list_size(self, Nv, val, pref) result(is_ok)

Check CLA multiple values list size consistency.

Type Bound

command_line_argument

Arguments

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

CLA data.

integer(kind=I4P), intent(in) :: Nv

Number of values.

character(len=*), intent(in) :: val

First value.

character(len=*), intent(in), optional :: pref

Prefixing string.

Return Value logical

Check result.


Calls

proc~~check_list_size~~CallsGraph proc~check_list_size flap_command_line_argument_t::command_line_argument%check_list_size proc~errored~2 flap_command_line_argument_t::command_line_argument%errored proc~check_list_size->proc~errored~2 interface~colorize face::colorize proc~errored~2->interface~colorize proc~print_error_message flap_object_t::object%print_error_message proc~errored~2->proc~print_error_message str str proc~errored~2->str proc~colorize_default face::colorize_default interface~colorize->proc~colorize_default proc~color_index face::color_index proc~colorize_default->proc~color_index proc~style_index face::style_index proc~colorize_default->proc~style_index proc~upper face::upper proc~colorize_default->proc~upper

Called by

proc~~check_list_size~~CalledByGraph proc~check_list_size flap_command_line_argument_t::command_line_argument%check_list_size proc~get_cla_list_varying_char flap_command_line_argument_t::command_line_argument%get_cla_list_varying_char proc~get_cla_list_varying_char->proc~check_list_size proc~get_cla_list_varying_i1p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_I1P proc~get_cla_list_varying_i1p->proc~check_list_size proc~get_cla_list_varying_i2p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_I2P proc~get_cla_list_varying_i2p->proc~check_list_size proc~get_cla_list_varying_i4p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_I4P proc~get_cla_list_varying_i4p->proc~check_list_size proc~get_cla_list_varying_i8p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_I8P proc~get_cla_list_varying_i8p->proc~check_list_size proc~get_cla_list_varying_logical flap_command_line_argument_t::command_line_argument%get_cla_list_varying_logical proc~get_cla_list_varying_logical->proc~check_list_size proc~get_cla_list_varying_r16p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_R16P proc~get_cla_list_varying_r16p->proc~check_list_size proc~get_cla_list_varying_r4p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_R4P proc~get_cla_list_varying_r4p->proc~check_list_size proc~get_cla_list_varying_r8p flap_command_line_argument_t::command_line_argument%get_cla_list_varying_R8P proc~get_cla_list_varying_r8p->proc~check_list_size none~get_varying flap_command_line_argument_t::command_line_argument%get_varying none~get_varying->proc~get_cla_list_varying_char none~get_varying->proc~get_cla_list_varying_i1p none~get_varying->proc~get_cla_list_varying_i2p none~get_varying->proc~get_cla_list_varying_i4p none~get_varying->proc~get_cla_list_varying_i8p none~get_varying->proc~get_cla_list_varying_logical none~get_varying->proc~get_cla_list_varying_r4p none~get_varying->proc~get_cla_list_varying_r8p proc~get_cla_list_varying_char~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_char proc~get_cla_list_varying_char~2->none~get_varying proc~get_cla_list_varying_i1p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_I1P proc~get_cla_list_varying_i1p~2->none~get_varying proc~get_cla_list_varying_i2p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_I2P proc~get_cla_list_varying_i2p~2->none~get_varying proc~get_cla_list_varying_i4p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_I4P proc~get_cla_list_varying_i4p~2->none~get_varying proc~get_cla_list_varying_i8p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_I8P proc~get_cla_list_varying_i8p~2->none~get_varying proc~get_cla_list_varying_logical~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_logical proc~get_cla_list_varying_logical~2->none~get_varying proc~get_cla_list_varying_r16p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_R16P proc~get_cla_list_varying_r16p~2->none~get_varying proc~get_cla_list_varying_r4p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_R4P proc~get_cla_list_varying_r4p~2->none~get_varying proc~get_cla_list_varying_r8p~2 flap_command_line_interface_t::command_line_interface%get_cla_list_varying_R8P proc~get_cla_list_varying_r8p~2->none~get_varying none~get_varying~2 flap_command_line_interface_t::command_line_interface%get_varying none~get_varying~2->proc~get_cla_list_varying_char~2 none~get_varying~2->proc~get_cla_list_varying_i1p~2 none~get_varying~2->proc~get_cla_list_varying_i2p~2 none~get_varying~2->proc~get_cla_list_varying_i4p~2 none~get_varying~2->proc~get_cla_list_varying_i8p~2 none~get_varying~2->proc~get_cla_list_varying_logical~2 none~get_varying~2->proc~get_cla_list_varying_r4p~2 none~get_varying~2->proc~get_cla_list_varying_r8p~2 program~flap_test_action_store flap_test_action_store program~flap_test_action_store->none~get_varying~2 program~flap_test_basic flap_test_basic program~flap_test_basic->none~get_varying~2

Source Code

  function check_list_size(self, Nv, val, pref) result(is_ok)
  !< Check CLA multiple values list size consistency.
  class(command_line_argument), intent(inout) :: self  !< CLA data.
  integer(I4P),                 intent(in)    :: Nv    !< Number of values.
  character(*),                 intent(in)    :: val   !< First value.
  character(*), optional,       intent(in)    :: pref  !< Prefixing string.
  logical                                     :: is_ok !< Check result.

  is_ok = .true.
  if (Nv==1) then
    if (trim(adjustl(val))=='') then
      ! there is no real value, but only for nargs=+ this is a real error
      is_ok = .false.
      if (self%nargs=='+') then
        call self%errored(pref=pref, error=ERROR_NARGS_INSUFFICIENT)
      endif
    endif
  endif
  endfunction check_list_size