Return option name/values pairs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(option), | intent(in) | :: | self | Option data. |
||
character(len=:), | intent(out), | allocatable | :: | pairs(:) | Option name/values pairs. |
pure subroutine get_pairs(self, pairs)
!< Return option name/values pairs.
class(option), intent(in) :: self !< Option data.
character(len=:), allocatable, intent(out) :: pairs(:) !< Option name/values pairs.
integer(I4P) :: Nc !< Counter.
if (self%oname%is_allocated()) then
Nc = max(self%oname%len(), self%ovals%len())
allocate(character(Nc) :: pairs(1:2))
pairs(1) = self%oname%chars()
pairs(2) = self%ovals%chars()
endif
endsubroutine get_pairs