Read a value into a deferred-length character.
| Type | Intent | Optional | 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 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(string_type), | private | :: | text |
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