Check if a CLAs group has been defined.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_interface), | intent(in) | :: | self |
CLI data. |
||
character(len=*), | intent(in) | :: | group |
Name of group (command) of CLAs. |
||
integer(kind=I4P), | intent(out), | optional | :: | g |
Index of group. |
Check if a CLAs group has been defined.
function is_defined_group(self, group, g) result(defined) !< Check if a CLAs group has been defined. class(command_line_interface), intent(in) :: self !< CLI data. character(*), intent(in) :: group !< Name of group (command) of CLAs. integer(I4P), optional, intent(out) :: g !< Index of group. logical :: defined !< Check if a CLAs group has been defined. integer(I4P) :: gg !< Counter. integer(I4P) :: ggg !< Counter. defined = .false. do gg=0, size(self%clasg,dim=1)-1 ggg = gg if (allocated(self%clasg(gg)%group)) defined = (self%clasg(gg)%group==group) if (defined) exit enddo if (present(g)) g = ggg endfunction is_defined_group