cli_get_char Subroutine

private subroutine cli_get_char(this, name, value, err)

Read a value into a deferred-length character.

Type Bound

cli_t

Arguments

Type IntentOptional Attributes Name
class(cli_t), intent(in) :: this
character(len=*), intent(in) :: name

Long name of a declared entry.

character(len=:), intent(out), allocatable :: value

The last value given, or the declared default.

type(error_t), intent(inout), optional :: err

Set to ERROR_VALIDATION when name was never declared.


Calls

proc~~cli_get_char~~CallsGraph proc~cli_get_char cli_t%cli_get_char proc~cli_get_string cli_t%cli_get_string proc~cli_get_char->proc~cli_get_string proc~cli_find cli_t%cli_find proc~cli_get_string->proc~cli_find proc~fail~2 fail proc~cli_get_string->proc~fail~2 proc~error_set error_t%error_set proc~fail~2->proc~error_set

Variables

Type Visibility Attributes Name Initial
type(string_type), private :: text

Source Code

   subroutine cli_get_char(this, name, value, err)
      !! Read a value into a deferred-length character.
      class(cli_t), intent(in) :: this
      character(len=*), intent(in) :: name
         !! Long name of a declared entry.
      character(len=:), allocatable, intent(out) :: value
         !! The last value given, or the declared default.
      type(error_t), intent(inout), optional :: err
         !! Set to `ERROR_VALIDATION` when `name` was never declared.

      type(string_type) :: text

      call this%get_string(name, text, err)
      value = char(text)
   end subroutine cli_get_char